mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
config: remove SHRINK_CONTROL_HAS_NID
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
72be1f4062
commit
1a64c06ec0
@ -57,32 +57,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK], [
|
||||
])
|
||||
])
|
||||
|
||||
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_SRC_SHRINK_CONTROL_HAS_NID], [
|
||||
ZFS_LINUX_TEST_SRC([shrink_control_nid], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct shrink_control sc __attribute__ ((unused));
|
||||
unsigned long scnidsize __attribute__ ((unused)) =
|
||||
sizeof(sc.nid);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
|
||||
AC_MSG_CHECKING([whether shrink_control has nid])
|
||||
ZFS_LINUX_TEST_RESULT([shrink_control_nid], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(SHRINK_CONTROL_HAS_NID, 1,
|
||||
[struct shrink_control has nid])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.0 API change
|
||||
dnl # register_shrinker() becomes a var-arg function that takes
|
||||
@ -145,14 +119,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_REGISTER], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [
|
||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK
|
||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR
|
||||
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_HAS_NID
|
||||
ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG
|
||||
ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [
|
||||
ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK
|
||||
ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
|
||||
ZFS_AC_KERNEL_REGISTER_SHRINKER_VARARG
|
||||
ZFS_AC_KERNEL_SHRINKER_REGISTER
|
||||
])
|
||||
|
@ -1203,8 +1203,7 @@ zfs_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
|
||||
if ((error = zfs_enter(zfsvfs, FTAG)) != 0)
|
||||
return (error);
|
||||
|
||||
#if defined(SHRINK_CONTROL_HAS_NID) && \
|
||||
defined(SHRINKER_NUMA_AWARE)
|
||||
#ifdef SHRINKER_NUMA_AWARE
|
||||
if (shrinker->flags & SHRINKER_NUMA_AWARE) {
|
||||
long tc = 1;
|
||||
for_each_online_node(sc.nid) {
|
||||
|
Loading…
Reference in New Issue
Block a user