]> git.proxmox.com Git - mirror_spl.git/commit - module/spl/spl-kmem-cache.c
Don't call kmem_cache_shrink from shrinker
authorChunwei Chen <david.chen@osnexus.com>
Sat, 24 Oct 2015 00:17:57 +0000 (17:17 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Nov 2015 21:48:31 +0000 (13:48 -0800)
commit3e7e6f34d0b39b210de68fd69a0c08c6d21227a5
treec97e563b68f99f1ed79c3a5a124f6fa2d574e096
parent9b13f65d284d3a6b455df3199ffc83fd18bbdded
Don't call kmem_cache_shrink from shrinker

Linux slab will automatically free empty slab when number of partial slab is
over min_partial, so we don't need to explicitly shrink it. In fact, calling
kmem_cache_shrink from shrinker will cause heavy contention on
kmem_cache_node->list_lock, to the point that it might cause __slab_free to
livelock (see zfsonlinux/zfs#3936)

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/zfs#3936
Closes #487
module/spl/spl-kmem-cache.c