mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
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 <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3495
This commit is contained in:
committed by
Brian Behlendorf
parent
410921241d
commit
90947b2357
@@ -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)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -87,6 +87,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY
|
||||
ZFS_AC_KERNEL_MOUNT_NODEV
|
||||
ZFS_AC_KERNEL_SHRINK
|
||||
ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
|
||||
ZFS_AC_KERNEL_S_INSTANCES_LIST_HEAD
|
||||
ZFS_AC_KERNEL_S_D_OP
|
||||
ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
|
||||
|
||||
Reference in New Issue
Block a user