summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authordbavatar <[email protected]>2017-08-24 13:48:23 -0400
committerBrian Behlendorf <[email protected]>2017-08-24 10:48:23 -0700
commit2209e40981e887c773914ec0f3b73cedf45ddb7d (patch)
tree3184936f39ef8d3081ee24a1d06a594c49f916ed /module/zfs
parent076e9b946ef7a706ce2926c29912c467cdeddab6 (diff)
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 #6528
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/arc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index d7ad101c3..75f0af9d5 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -5064,8 +5064,13 @@ arc_evictable_memory(void)
* Scale reported evictable memory in proportion to page cache, cap
* at specified min/max.
*/
+#ifdef ZFS_GLOBAL_NODE_PAGE_STATE
+ uint64_t min = (ptob(global_node_page_state(NR_FILE_PAGES)) / 100) *
+ zfs_arc_pc_percent;
+#else
uint64_t min = (ptob(global_page_state(NR_FILE_PAGES)) / 100) *
zfs_arc_pc_percent;
+#endif
min = MAX(arc_c_min, MIN(arc_c_max, min));
if (arc_dirty >= min)