diff options
author | Tim Chase <[email protected]> | 2015-06-14 11:19:40 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-17 10:43:13 -0700 |
commit | 90947b2357157a376fdd23dadbcfedad82652525 (patch) | |
tree | c8a505d82d31e31772867c95b1b2b018b2b48594 /config/kernel-shrink.m4 | |
parent | 410921241d00d9e6e48d6e544ab5fbf2f642a72d (diff) |
3.12 compat, NUMA-aware per-superblock shrinker
Kernels >= 3.12 have a NUMA-aware superblock shrinker which is used in
ZoL by zfs_sb_prune(). This patch calls the shrinker for each on-line
NUMA node in order that memory be freed for each one.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3495
Diffstat (limited to 'config/kernel-shrink.m4')
-rw-r--r-- | config/kernel-shrink.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4 index 1c211ed15..a57c2afb0 100644 --- a/config/kernel-shrink.m4 +++ b/config/kernel-shrink.m4 @@ -109,3 +109,25 @@ AC_DEFUN([ZFS_AC_KERNEL_FREE_CACHED_OBJECTS], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 3.12 API change +dnl # The nid member was added to struct shrink_control to support +dnl # NUMA-aware shrinkers. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [ + AC_MSG_CHECKING([whether shrink_control has nid]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + ],[ + struct shrink_control sc __attribute__ ((unused)); + unsigned long scnidsize __attribute__ ((unused)) = + sizeof(sc.nid); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(SHRINK_CONTROL_HAS_NID, 1, + [struct shrink_control has nid]) + ],[ + AC_MSG_RESULT(no) + ]) +]) |