Linux 5.9 compat: NR_SLAB_RECLAIMABLE (#10865)

Commit dcdc12e added compatibility code to treat NR_SLAB_RECLAIMABLE_B
as if it were the same as NR_SLAB_RECLAIMABLE.  However, the new value
is in bytes while the old value was in pages which means they are not
interchangeable.

The only place the reclaimable slab size is used is as a component of
the calculation done by arc_free_memory().  This function returns the
amount of memory the ARC considers to be free or reclaimable at little
cost.  Rather than switch to a new interface to get this value it has
been removed it from the calculation.  It is normally a minor component
compared to the number of inactive or free pages, and removing it
aligns the behavior with the FreeBSD version of arc_free_memory().


Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Backported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Closes #10834
This commit is contained in:
Brian Behlendorf
2020-09-09 13:16:59 -07:00
committed by Tony Hutter
parent f6e54ea4f5
commit d2acd3696f
4 changed files with 1 additions and 47 deletions
+1 -2
View File
@@ -4859,8 +4859,7 @@ arc_free_memory(void)
#else
return (ptob(nr_free_pages() +
nr_inactive_file_pages() +
nr_inactive_anon_pages() +
nr_slab_reclaimable_pages()));
nr_inactive_anon_pages()));
#endif /* CONFIG_HIGHMEM */
#else