]> git.proxmox.com Git - mirror_spl-debian.git/commit
kmem-cache: Use taskqs for ageing
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 10 Dec 2012 18:53:46 +0000 (10:53 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 12 Dec 2012 17:56:54 +0000 (09:56 -0800)
commita10287e00d13c4c4dbbff14f42b00b03da363fcb
tree946bdaf4fc2f002953374abe7e19403463a9c9e6
parent296a8e596dac344cf3af5e7f2dff5be12c979d80
kmem-cache: Use taskqs for ageing

Shift the cache and magazine ageing functionality over to the new
delayed taskq interfaces.  This allows us to abandon the kernels
delayed work queue interface and all the compatibility code it
requires.

However, the delayed taskq interface does not allow us to schedule
a task for a specfic cpu so the ageing code was slightly reworked.
The magazine ageing delay has been directly linked to the cache
ageing function.  The spl_cache_age() function invokes on_each_cpu()
in order to run spl_magazine_age() on each cpu.  It then blocks
waiting for them to complete and promptly reclaims any free slabs.

When restructing the code wasn't the primary goal I think the
new code is far more understable and maintainable.  It also should
help minimize magazine thrashing because free slabs are immediately
released after the magazine is aged.

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