linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
@ 2010-02-18 22:29 Anton Blanchard
  2010-02-19  0:07 ` Anton Blanchard
  2010-02-19 15:43 ` Balbir Singh
  0 siblings, 2 replies; 14+ messages in thread
From: Anton Blanchard @ 2010-02-18 22:29 UTC (permalink / raw)
  To: mel, benh, cl; +Cc: linuxppc-dev


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>
---

Index: powerpc.git/arch/powerpc/include/asm/topology.h
===================================================================
--- powerpc.git.orig/arch/powerpc/include/asm/topology.h	2010-02-18 14:26:45.736821967 +1100
+++ powerpc.git/arch/powerpc/include/asm/topology.h	2010-02-18 14:51:24.793071748 +1100
@@ -8,6 +8,16 @@ struct device_node;
 
 #ifdef CONFIG_NUMA
 
+/*
+ * Before going off node we want the VM to try and reclaim from the local
+ * node. It does this if the remote distance is larger than RECLAIM_DISTANCE.
+ * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of
+ * 20, we never reclaim and go off node straight away.
+ *
+ * To fix this we choose a smaller value of RECLAIM_DISTANCE.
+ */
+#define RECLAIM_DISTANCE 10
+
 #include <asm/mmzone.h>
 
 static inline int cpu_to_node(int cpu)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-03-01 15:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 22:29 [PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim Anton Blanchard
2010-02-19  0:07 ` Anton Blanchard
2010-02-19 14:55   ` Mel Gorman
2010-02-19 15:12     ` Christoph Lameter
2010-02-19 15:41       ` Balbir Singh
2010-02-19 15:51         ` Christoph Lameter
2010-02-19 17:39           ` Balbir Singh
2010-02-23  1:55     ` Anton Blanchard
2010-02-23 16:23       ` Mel Gorman
2010-02-24 15:43       ` Christoph Lameter
2010-03-01 12:06       ` Mel Gorman
2010-03-01 15:19         ` Christoph Lameter
2010-02-19 15:43 ` Balbir Singh
2010-02-23  1:38   ` Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).