diff options
-rw-r--r-- | Documentation/sysctl/vm.txt | 17 | ||||
-rw-r--r-- | arch/ia64/include/asm/topology.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 8 | ||||
-rw-r--r-- | include/linux/topology.h | 3 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
5 files changed, 15 insertions, 18 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index dd9d0e33b443..5b6da0fb5fbf 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -772,16 +772,17 @@ This is value ORed together of | |||
772 | 2 = Zone reclaim writes dirty pages out | 772 | 2 = Zone reclaim writes dirty pages out |
773 | 4 = Zone reclaim swaps pages | 773 | 4 = Zone reclaim swaps pages |
774 | 774 | ||
775 | zone_reclaim_mode is set during bootup to 1 if it is determined that pages | 775 | zone_reclaim_mode is disabled by default. For file servers or workloads |
776 | from remote zones will cause a measurable performance reduction. The | 776 | that benefit from having their data cached, zone_reclaim_mode should be |
777 | page allocator will then reclaim easily reusable pages (those page | 777 | left disabled as the caching effect is likely to be more important than |
778 | cache pages that are currently not used) before allocating off node pages. | ||
779 | |||
780 | It may be beneficial to switch off zone reclaim if the system is | ||
781 | used for a file server and all of memory should be used for caching files | ||
782 | from disk. In that case the caching effect is more important than | ||
783 | data locality. | 778 | data locality. |
784 | 779 | ||
780 | zone_reclaim may be enabled if it's known that the workload is partitioned | ||
781 | such that each partition fits within a NUMA node and that accessing remote | ||
782 | memory would cause a measurable performance reduction. The page allocator | ||
783 | will then reclaim easily reusable pages (those page cache pages that are | ||
784 | currently not used) before allocating off node pages. | ||
785 | |||
785 | Allowing zone reclaim to write out pages stops processes that are | 786 | Allowing zone reclaim to write out pages stops processes that are |
786 | writing large amounts of data from dirtying pages on other nodes. Zone | 787 | writing large amounts of data from dirtying pages on other nodes. Zone |
787 | reclaim will write out dirty pages if a zone fills up and so effectively | 788 | reclaim will write out dirty pages if a zone fills up and so effectively |
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 3202aa74e0d6..6437ca21f61b 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -21,7 +21,8 @@ | |||
21 | #define PENALTY_FOR_NODE_WITH_CPUS 255 | 21 | #define PENALTY_FOR_NODE_WITH_CPUS 255 |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * Distance above which we begin to use zone reclaim | 24 | * Nodes within this distance are eligible for reclaim by zone_reclaim() when |
25 | * zone_reclaim_mode is enabled. | ||
25 | */ | 26 | */ |
26 | #define RECLAIM_DISTANCE 15 | 27 | #define RECLAIM_DISTANCE 15 |
27 | 28 | ||
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index c9202151079f..6c8a8c5a37a1 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -9,12 +9,8 @@ struct device_node; | |||
9 | #ifdef CONFIG_NUMA | 9 | #ifdef CONFIG_NUMA |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Before going off node we want the VM to try and reclaim from the local | 12 | * If zone_reclaim_mode is enabled, a RECLAIM_DISTANCE of 10 will mean that |
13 | * node. It does this if the remote distance is larger than RECLAIM_DISTANCE. | 13 | * all zones on all nodes will be eligible for zone_reclaim(). |
14 | * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of | ||
15 | * 20, we never reclaim and go off node straight away. | ||
16 | * | ||
17 | * To fix this we choose a smaller value of RECLAIM_DISTANCE. | ||
18 | */ | 14 | */ |
19 | #define RECLAIM_DISTANCE 10 | 15 | #define RECLAIM_DISTANCE 10 |
20 | 16 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index 973671ff9e7d..dda6ee521e74 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -58,7 +58,8 @@ int arch_update_cpu_topology(void); | |||
58 | /* | 58 | /* |
59 | * If the distance between nodes in a system is larger than RECLAIM_DISTANCE | 59 | * If the distance between nodes in a system is larger than RECLAIM_DISTANCE |
60 | * (in whatever arch specific measurement units returned by node_distance()) | 60 | * (in whatever arch specific measurement units returned by node_distance()) |
61 | * then switch on zone reclaim on boot. | 61 | * and zone_reclaim_mode is enabled then the VM will only call zone_reclaim() |
62 | * on nodes within this distance. | ||
62 | */ | 63 | */ |
63 | #define RECLAIM_DISTANCE 30 | 64 | #define RECLAIM_DISTANCE 30 |
64 | #endif | 65 | #endif |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7cfdcd808f52..dfe954fbb48a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1860,8 +1860,6 @@ static void __paginginit init_zone_allows_reclaim(int nid) | |||
1860 | for_each_node_state(i, N_MEMORY) | 1860 | for_each_node_state(i, N_MEMORY) |
1861 | if (node_distance(nid, i) <= RECLAIM_DISTANCE) | 1861 | if (node_distance(nid, i) <= RECLAIM_DISTANCE) |
1862 | node_set(i, NODE_DATA(nid)->reclaim_nodes); | 1862 | node_set(i, NODE_DATA(nid)->reclaim_nodes); |
1863 | else | ||
1864 | zone_reclaim_mode = 1; | ||
1865 | } | 1863 | } |
1866 | 1864 | ||
1867 | #else /* CONFIG_NUMA */ | 1865 | #else /* CONFIG_NUMA */ |