]> granicus.if.org Git - spl/commit
Ensure a minimum of one slab is reclaimed
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 1 May 2012 21:27:29 +0000 (14:27 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 7 May 2012 18:54:28 +0000 (11:54 -0700)
commitb78d4b9d98b8486199ba9072d7fc345121a4601f
treeb20e09d5a518c10af2f28d591169b372d83d7ab3
parent06089b9e1929440e07a9eb7a11e68197a4ab40f2
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
module/spl/spl-kmem.c