HomeFreeBSD

Throttle number of freed slabs based on nr_to_scan

Description

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

Details

Provenance
Prakash Surya <surya1@llnl.gov>Authored on Apr 27 2012, 10:10 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 7 2012, 6:46 PM
Parents
rGef6f91ce0c96: Add missing 64-bit divide for 32-bit ARM
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGcef7605c342a: Throttle number of freed slabs based on nr_to_scan (authored by Prakash Surya <surya1@llnl.gov>).May 7 2012, 6:46 PM