Skip to content

Commit

Permalink
config: remove ZFS_GLOBAL_ZONE_PAGE_STATE
Browse files Browse the repository at this point in the history
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16479
  • Loading branch information
robn authored and behlendorf committed Sep 18, 2024
1 parent 0a00804 commit 8d9cb04
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
31 changes: 0 additions & 31 deletions config/kernel-global_page_state.m4
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
dnl #
dnl # 4.14 API change
dnl #
dnl # c41f012ade0b mm: rename global_page_state to global_zone_page_state
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE], [
ZFS_LINUX_TEST_SRC([global_zone_page_state], [
#include <linux/mm.h>
#include <linux/vmstat.h>
],[
(void) global_zone_page_state(0);
])
])

AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE], [
AC_MSG_CHECKING([whether global_zone_page_state() exists])
ZFS_LINUX_TEST_RESULT([global_zone_page_state], [
AC_MSG_RESULT(yes)
AC_DEFINE(ZFS_GLOBAL_ZONE_PAGE_STATE, 1,
[global_zone_page_state() exists])
],[
AC_MSG_RESULT(no)
])
])

dnl #
dnl # Create a define and autoconf variable for an enum member
dnl #
Expand Down Expand Up @@ -72,16 +47,10 @@ AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE_SANITY], [
AC_MSG_RESULT(yes)
])

AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE], [
ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE
])

dnl #
dnl # enum members in which we're interested
dnl #
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE], [
ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
[node_stat_item], [$LINUX/include/linux/mmzone.h])
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],
Expand Down
1 change: 0 additions & 1 deletion config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_TYPES
ZFS_AC_KERNEL_SRC_OBJTOOL
ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE
ZFS_AC_KERNEL_SRC_ACCESS_OK_TYPE
ZFS_AC_KERNEL_SRC_PDE_DATA
ZFS_AC_KERNEL_SRC_GENERIC_FADVISE
Expand Down
23 changes: 0 additions & 23 deletions include/os/linux/kernel/linux/page_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
/*
* Create our own accessor functions to follow the Linux API changes
*/
#if defined(ZFS_GLOBAL_ZONE_PAGE_STATE)

/* global_zone_page_state() introduced */
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
#else
Expand All @@ -36,25 +34,4 @@
#define nr_inactive_file_pages() global_zone_page_state(NR_INACTIVE_FILE)
#endif

#else

/* global_node_page_state() introduced */
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
#else
#define nr_file_pages() global_page_state(NR_FILE_PAGES)
#endif
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON)
#define nr_inactive_anon_pages() global_node_page_state(NR_INACTIVE_ANON)
#else
#define nr_inactive_anon_pages() global_page_state(NR_INACTIVE_ANON)
#endif
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE)
#define nr_inactive_file_pages() global_node_page_state(NR_INACTIVE_FILE)
#else
#define nr_inactive_file_pages() global_page_state(NR_INACTIVE_FILE)
#endif

#endif /* ZFS_GLOBAL_ZONE_PAGE_STATE */

#endif /* _ZFS_PAGE_COMPAT_H */

0 comments on commit 8d9cb04

Please sign in to comment.