diff options
author | Brian Behlendorf <[email protected]> | 2020-08-29 20:57:45 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-29 20:57:45 -0700 |
commit | 3e29e1971bbb4ab63dafeb592b747ef56bad3534 (patch) | |
tree | 44499ca4f445fb203e3f0640d8de746607f6ee59 /include/os/linux/spl | |
parent | 62663fb7ec191ca2f872aec1636e94934212936f (diff) |
Linux 5.9 compat: NR_SLAB_RECLAIMABLE
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 <[email protected]>
Reviewed-by: Coleman Kane <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #10834
Diffstat (limited to 'include/os/linux/spl')
-rw-r--r-- | include/os/linux/spl/sys/vmsystm.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/os/linux/spl/sys/vmsystm.h b/include/os/linux/spl/sys/vmsystm.h index 705339486..8783231dc 100644 --- a/include/os/linux/spl/sys/vmsystm.h +++ b/include/os/linux/spl/sys/vmsystm.h @@ -47,17 +47,6 @@ #define membar_producer() smp_wmb() #define physmem zfs_totalram_pages -#ifdef ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE_B -#define freemem (nr_free_pages() + \ - global_page_state(NR_INACTIVE_FILE) + \ - global_page_state(NR_INACTIVE_ANON) + \ - global_page_state(NR_SLAB_RECLAIMABLE_B)) -#else -#define freemem (nr_free_pages() + \ - global_page_state(NR_INACTIVE_FILE) + \ - global_page_state(NR_INACTIVE_ANON) + \ - global_page_state(NR_SLAB_RECLAIMABLE)) -#endif /* ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE_B */ #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) |