HomeFreeBSD

Ensure a minimum of one slab is reclaimed

Description

Ensure a minimum of one slab is reclaimed

To minimize the chance of triggering an OOM during direct reclaim.
The kmem caches have been improved to make a best effort to reclaim
at least one slab when a reclaim function is registered. This helps
avoid the case where objects are released but they are spread over
multiple slabs so no memory gets reclaimed.

Care has been taken to avoid deadlocking if the reclaim function
is unable to make forward progress. Additionally, the reclaim
function may be skipped entirely if there are already free slabs
which can be safely reaped.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #107

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on May 1 2012, 9:27 PM
Parents
rG06089b9e1929: Ensure direct reclaim forward progress
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb78d4b9d98b8: Ensure a minimum of one slab is reclaimed (authored by Brian Behlendorf <behlendorf1@llnl.gov>).May 7 2012, 6:54 PM