aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-05-16 16:19:56 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-05-21 03:31:12 -0400
commit56608209d34b8add40af54031d4e420afbcde9f6 (patch)
tree6aa984dc088df39b426f6320f3cbd09c26e5e72e /arch/powerpc
parentb878dc00595440586874952dd85ce9b803360b87 (diff)
powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
I noticed /proc/sys/vm/zone_reclaim_mode was 0 on a ppc64 NUMA box. It gets enabled via this: /* * If another node is sufficiently far away then it is better * to reclaim pages in a zone before going off node. */ if (distance > RECLAIM_DISTANCE) zone_reclaim_mode = 1; Since we use the default value of 20 for REMOTE_DISTANCE and 20 for RECLAIM_DISTANCE it never kicks in. The local to remote bandwidth ratios can be quite large on System p machines so it makes sense for us to reclaim clean pagecache locally before going off node. The patch below sets a smaller value for RECLAIM_DISTANCE and thus enables zone reclaim. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/topology.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 84ad11f65dc2..32adf7280720 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -18,6 +18,16 @@ struct device_node;
18 */ 18 */
19#define RECLAIM_DISTANCE 10 19#define RECLAIM_DISTANCE 10
20 20
21/*
22 * Before going off node we want the VM to try and reclaim from the local
23 * node. It does this if the remote distance is larger than RECLAIM_DISTANCE.
24 * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of
25 * 20, we never reclaim and go off node straight away.
26 *
27 * To fix this we choose a smaller value of RECLAIM_DISTANCE.
28 */
29#define RECLAIM_DISTANCE 10
30
21#include <asm/mmzone.h> 31#include <asm/mmzone.h>
22 32
23static inline int cpu_to_node(int cpu) 33static inline int cpu_to_node(int cpu)