]> granicus.if.org Git - spl/commit
Never spin in kmem_cache_alloc()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 5 Nov 2012 21:54:20 +0000 (13:54 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 6 Nov 2012 23:48:39 +0000 (15:48 -0800)
commitdc1b30224f9b1587dbe383d9c8e16caa4b1f71d3
tree02a97ae4725493bdd4836389b1a732bd8403e3f8
parenta1af8fb1eaa08e55f6e0799779a89f455a5017f2
Never spin in kmem_cache_alloc()

If we are reaping from the cache and a concurrent allocation
occurs then the caller must block until the reaping is complete.
This is signaled by the clearing of the KMC_BIT_REAPING bit.

Otherwise the caller will be in a tight loop which takes and
releases the skc->skc_cache lock.  When there are multiple
concurrent callers the system will thrash on the lock and
appear to lock up.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/spl/spl-kmem.c