summaryrefslogtreecommitdiffstats
path: root/config/kernel.m4
diff options
context:
space:
mode:
authorchrisrd <[email protected]>2018-02-24 03:50:06 +1100
committerBrian Behlendorf <[email protected]>2018-02-23 08:50:06 -0800
commite9a77290081b578144e9a911ad734f67274df82f (patch)
tree29036268b80f1a2695867d079e2a4facf916a616 /config/kernel.m4
parent7088545d0166aa05b2c783f18aa821d95a1f023d (diff)
Fix free memory calculation on v3.14+
Provide infrastructure to auto-configure to enum and API changes in the global page stats used for our free memory calculations. arc_free_memory has been broken since an API change in Linux v3.14: 2016-07-28 v4.8 599d0c95 mm, vmscan: move LRU lists to node 2016-07-28 v4.8 75ef7184 mm, vmstat: add infrastructure for per-node vmstats These commits moved some of global_page_state() into global_node_page_state(). The API change was particularly egregious as, instead of breaking the old code, it silently did the wrong thing and we continued using global_page_state() where we should have been using global_node_page_state(), thus indexing into the wrong array via NR_SLAB_RECLAIMABLE et al. There have been further API changes along the way: 2017-07-06 v4.13 385386cf mm: vmstat: move slab statistics from zone to node counters 2017-09-06 v4.14 c41f012a mm: rename global_page_state to global_zone_page_state ...and various (incomplete, as it turns out) attempts to accomodate these changes in ZoL: 2017-08-24 2209e409 Linux 4.8+ compatibility fix for vm stats 2017-09-16 787acae0 Linux 3.14 compat: IO acct, global_page_state, etc 2017-09-19 661907e6 Linux 4.14 compat: IO acct, global_page_state, etc The config infrastructure provided here resolves these issues going back to the original API change in v3.14 and is robust against further Linux changes in this area. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Chris Dunlop <[email protected]> Closes #7170
Diffstat (limited to 'config/kernel.m4')
-rw-r--r--config/kernel.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index 9b11dc179..a1bbbc2de 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -123,7 +123,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_RENAME_WANTS_FLAGS
ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR
ZFS_AC_KERNEL_CURRENT_TIME
- ZFS_AC_KERNEL_VM_NODE_STAT
+ ZFS_AC_KERNEL_GLOBAL_PAGE_STATE
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [