]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Zone reclaim: proc override
authorChristoph Lameter <clameter@sgi.com>
Thu, 19 Jan 2006 01:42:32 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:17 +0000 (19:20 -0800)
proc support for zone reclaim

This patch creates a proc entry /proc/sys/vm/zone_reclaim_mode that may be
used to override the automatic determination of the zone reclaim made on
bootup.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Documentation/sysctl/vm.txt
include/linux/sysctl.h
kernel/sysctl.c

index 6910c0136f8d7e23458ef0279fbf7b301c3fdd0b..391dd64363e75b560f68bdd69879946b07cf03da 100644 (file)
@@ -27,6 +27,7 @@ Currently, these files are in /proc/sys/vm:
 - laptop_mode
 - block_dump
 - drop-caches
+- zone_reclaim_mode
 
 ==============================================================
 
@@ -120,3 +121,20 @@ set to pcp->high/4.  The upper limit of batch is (PAGE_SHIFT * 8)
 
 The initial value is zero.  Kernel does not use this value at boot time to set
 the high water marks for each per cpu page list.
+
+===============================================================
+
+zone_reclaim_mode:
+
+This is set during bootup to 1 if it is determined that pages from
+remote zones will cause a significant performance reduction. The
+page allocator will then reclaim easily reusable pages (those page
+cache pages that are currently not used) before going off node.
+
+The user can override this setting. It may be beneficial to switch
+off zone reclaim if the system is used for a file server and all
+of memory should be used for caching files from disk.
+
+It may be beneficial to switch this on if one wants to do zone
+reclaim regardless of the numa distances in the system.
+
index 7f472127b7b59d2d3a85e99b15ffea69f670e071..8352a7ce58951673caff4da3f1a7468d77445fc2 100644 (file)
@@ -182,6 +182,7 @@ enum
        VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
        VM_DROP_PAGECACHE=29,   /* int: nuke lots of pagecache */
        VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
+       VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */
 };
 
 
index f5d69b6e29f50fb051b8ecf1add5964865c105f4..cb99a42f8b37c60e991332ce33b4fba1dacb9dc6 100644 (file)
@@ -869,6 +869,17 @@ static ctl_table vm_table[] = {
                .proc_handler   = &proc_dointvec_jiffies,
                .strategy       = &sysctl_jiffies,
        },
+#endif
+#ifdef CONFIG_NUMA
+       {
+               .ctl_name       = VM_ZONE_RECLAIM_MODE,
+               .procname       = "zone_reclaim_mode",
+               .data           = &zone_reclaim_mode,
+               .maxlen         = sizeof(zone_reclaim_mode),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec,
+               .strategy       = &zero,
+       },
 #endif
        { .ctl_name = 0 }
 };