mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
Include other sources of freeable memory in the freemem calculation
Prevents ARC collapse when non-ZFS filesystems, the block layer or other memory consumers use a lot of reclaimable memory in the page cache. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes zfsonlinux/zfs#3680 Closes #471
This commit is contained in:
parent
8ac6ffecaf
commit
851a549305
@ -35,7 +35,10 @@
|
||||
|
||||
#define membar_producer() smp_wmb()
|
||||
#define physmem totalram_pages
|
||||
#define freemem nr_free_pages()
|
||||
#define freemem (nr_free_pages() + \
|
||||
global_page_state(NR_INACTIVE_FILE) + \
|
||||
global_page_state(NR_INACTIVE_ANON) + \
|
||||
global_page_state(NR_SLAB_RECLAIMABLE))
|
||||
|
||||
#define xcopyin(from, to, size) copy_from_user(to, from, size)
|
||||
#define xcopyout(from, to, size) copy_to_user(to, from, size)
|
||||
|
Loading…
Reference in New Issue
Block a user