]> granicus.if.org Git - zfs/commit
kmem_cache: Call constructor/destructor on each alloc/free
authorRichard Yao <ryao@gentoo.org>
Tue, 17 Jun 2014 23:37:02 +0000 (19:37 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 28 Oct 2014 16:21:08 +0000 (09:21 -0700)
commitad9863e80be35825229d0638c5e69c0ea30f82de
tree6e095ad508c7efc6f80c208c8ea502dbc090dee6
parent802a4a2ad53f6844ce2dbbf219a5e373ebd24688
kmem_cache: Call constructor/destructor on each alloc/free

This has a few benefits. First, it fixes a regression that "Rework
generic memory allocation interfaces" appears to have triggered in
splat's slab_reap and slab_age tests. Second, it makes porting code from
Illumos to ZFSOnLinux easier. Third, it has the side effect of making
reclaim from slab caches that specify reclaim functions an order of
magnitude faster. The splat slab_reap test usually took 30 to 40
seconds. With this change, it takes 3 to 4.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #369
module/spl/spl-kmem.c