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:
Rob Norris 2024-08-04 10:34:18 +10:00 committed by Brian Behlendorf
parent 72be1f4062
commit 1a64c06ec0
2 changed files with 1 additions and 30 deletions

View File

@ -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 #
dnl # 6.0 API change dnl # 6.0 API change
dnl # register_shrinker() becomes a var-arg function that takes 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], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR 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_REGISTER_SHRINKER_VARARG
ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER
]) ])
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [
ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK
ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
ZFS_AC_KERNEL_REGISTER_SHRINKER_VARARG ZFS_AC_KERNEL_REGISTER_SHRINKER_VARARG
ZFS_AC_KERNEL_SHRINKER_REGISTER ZFS_AC_KERNEL_SHRINKER_REGISTER
]) ])

View File

@ -1203,8 +1203,7 @@ zfs_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
if ((error = zfs_enter(zfsvfs, FTAG)) != 0) if ((error = zfs_enter(zfsvfs, FTAG)) != 0)
return (error); return (error);
#if defined(SHRINK_CONTROL_HAS_NID) && \ #ifdef SHRINKER_NUMA_AWARE
defined(SHRINKER_NUMA_AWARE)
if (shrinker->flags & SHRINKER_NUMA_AWARE) { if (shrinker->flags & SHRINKER_NUMA_AWARE) {
long tc = 1; long tc = 1;
for_each_online_node(sc.nid) { for_each_online_node(sc.nid) {