aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sysctl/vm.txt18
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--kernel/sysctl.c11
3 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 6910c0136f8d..391dd64363e7 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -27,6 +27,7 @@ Currently, these files are in /proc/sys/vm:
27- laptop_mode 27- laptop_mode
28- block_dump 28- block_dump
29- drop-caches 29- drop-caches
30- zone_reclaim_mode
30 31
31============================================================== 32==============================================================
32 33
@@ -120,3 +121,20 @@ set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
120 121
121The initial value is zero. Kernel does not use this value at boot time to set 122The initial value is zero. Kernel does not use this value at boot time to set
122the high water marks for each per cpu page list. 123the high water marks for each per cpu page list.
124
125===============================================================
126
127zone_reclaim_mode:
128
129This is set during bootup to 1 if it is determined that pages from
130remote zones will cause a significant performance reduction. The
131page allocator will then reclaim easily reusable pages (those page
132cache pages that are currently not used) before going off node.
133
134The user can override this setting. It may be beneficial to switch
135off zone reclaim if the system is used for a file server and all
136of memory should be used for caching files from disk.
137
138It may be beneficial to switch this on if one wants to do zone
139reclaim regardless of the numa distances in the system.
140
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 7f472127b7b5..8352a7ce5895 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -182,6 +182,7 @@ enum
182 VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ 182 VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
183 VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ 183 VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */
184 VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ 184 VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
185 VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */
185}; 186};
186 187
187 188
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f5d69b6e29f5..cb99a42f8b37 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -870,6 +870,17 @@ static ctl_table vm_table[] = {
870 .strategy = &sysctl_jiffies, 870 .strategy = &sysctl_jiffies,
871 }, 871 },
872#endif 872#endif
873#ifdef CONFIG_NUMA
874 {
875 .ctl_name = VM_ZONE_RECLAIM_MODE,
876 .procname = "zone_reclaim_mode",
877 .data = &zone_reclaim_mode,
878 .maxlen = sizeof(zone_reclaim_mode),
879 .mode = 0644,
880 .proc_handler = &proc_dointvec,
881 .strategy = &zero,
882 },
883#endif
873 { .ctl_name = 0 } 884 { .ctl_name = 0 }
874}; 885};
875 886