]> git.proxmox.com Git - mirror_spl.git/commit
Linux 3.12 compat: shrinker semantics
authorTim Chase <tim@chase2k.com>
Thu, 2 Oct 2014 12:40:05 +0000 (07:40 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 28 Oct 2014 16:20:13 +0000 (09:20 -0700)
commit802a4a2ad53f6844ce2dbbf219a5e373ebd24688
tree12575c949da73fa28af4a854ea387ae1f0f28a2d
parent46c936756ea26a52945eb8e8756e7c44ea9fc125
Linux 3.12 compat: shrinker semantics

The new shrinker API as of Linux 3.12 modifies "struct shrinker" by
replacing the @shrink callback with the pair of @count_objects and
@scan_objects.  It also requires the return value of @count_objects to
return the number of objects actually freed whereas the previous @shrink
callback returned the number of remaining freeable objects.

This patch adds support for the new @scan_objects return value semantics
and updates the splat shrinker test case appropriately.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #403
include/linux/mm_compat.h
module/spl/spl-kmem.c
module/splat/splat-linux.c