forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux 4.8+ compatibility fix for vm stats
vm_node_stat must be used instead of vm_zone_stat. Unfortunately the old code still compiles potentially leading to silent failure of arc_evictable_memory() AKAMAI: CR 3816601: Regression in zfs dropcache test Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Debabrata Banerjee <[email protected]> Closes openzfs#6528
- Loading branch information
1 parent
076e9b9
commit 2209e40
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
dnl # | ||
dnl # 4.8 API change | ||
dnl # kernel vm counters change | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_VM_NODE_STAT], [ | ||
AC_MSG_CHECKING([whether to use vm_node_stat based fn's]) | ||
ZFS_LINUX_TRY_COMPILE([ | ||
#include <linux/mm.h> | ||
#include <linux/vmstat.h> | ||
],[ | ||
int a __attribute__ ((unused)) = NR_VM_NODE_STAT_ITEMS; | ||
long x __attribute__ ((unused)) = | ||
atomic_long_read(&vm_node_stat[0]); | ||
(void) global_node_page_state(0); | ||
],[ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(ZFS_GLOBAL_NODE_PAGE_STATE, 1, | ||
[using global_node_page_state()]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters