• Christoph Lameter's avatar
    slub: free slabs without holding locks · 69cb8e6b
    Christoph Lameter authored
    There are two situations in which slub holds a lock while releasing
    pages:
    
    	A. During kmem_cache_shrink()
    	B. During kmem_cache_close()
    
    For A build a list while holding the lock and then release the pages
    later. In case of B we are the last remaining user of the slab so
    there is no need to take the listlock.
    
    After this patch all calls to the page allocator to free pages are
    done without holding any spinlocks. kmem_cache_destroy() will still
    hold the slub_lock semaphore.
    Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    69cb8e6b
slub.c 123 KB