]> git.proxmox.com Git - mirror_zfs.git/commit
Throttle number of freed slabs based on nr_to_scan
authorPrakash Surya <surya1@llnl.gov>
Fri, 27 Apr 2012 22:10:02 +0000 (15:10 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 7 May 2012 18:46:15 +0000 (11:46 -0700)
commitcef7605c342a87eb108b6eac919cae737c08a230
tree6da8b86d2305cfd5b68439e6a3e9d9d73e9e3f70
parentef6f91ce0c96f7440a6fab23cb605a7f67185790
Throttle number of freed slabs based on nr_to_scan

Previously, the SPL tried to maintain Solaris semantics by freeing
all available (empty) slabs from its slab caches when the shrinker
was called. This is not desirable when running on Linux. To make
the SPL shrinker more Linux friendly, the actual number of freed
slabs from each of the slab caches is now derived from nr_to_scan
and skc_slab_objs.

Additionally, an accounting bug was fixed in spl_slab_reclaim()
which could cause us to reclaim one more slab than requested.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #101
include/sys/kmem.h
module/spl/spl-kmem.c