powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
commit56608209d34b8add40af54031d4e420afbcde9f6
authorAnton Blanchard <anton@samba.org>
Sun, 16 May 2010 20:19:56 +0000 (16 20:19 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 21 May 2010 07:31:12 +0000 (21 17:31 +1000)
tree6aa984dc088df39b426f6320f3cbd09c26e5e72e
parentb878dc00595440586874952dd85ce9b803360b87
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>
arch/powerpc/include/asm/topology.h