Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/numa: Enable SD_WAKE_AFFINE in node definition

When chasing a performance issue on ppc64, I noticed tasks
communicating via a pipe would often end up on different nodes.

It turns out SD_WAKE_AFFINE is not set in our node defition. Commit
9fcd18c9e63e (sched: re-tune balancing) enabled SD_WAKE_AFFINE
in the node definition for x86 and we need a similar change for
ppc64.

I used lmbench lat_ctx and perf bench pipe to verify this fix. Each
benchmark was run 10 times and the average taken.

lmbench lat_ctx:

before: 66565 ops/sec
after: 204700 ops/sec

3.1x faster

perf bench pipe:

before: 5.6570 usecs
after: 1.3470 usecs

4.2x faster

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
a200d8e4 1cce058b

+1 -1
+1 -1
arch/powerpc/include/asm/topology.h
··· 73 73 | 1*SD_BALANCE_EXEC \ 74 74 | 1*SD_BALANCE_FORK \ 75 75 | 0*SD_BALANCE_WAKE \ 76 - | 0*SD_WAKE_AFFINE \ 76 + | 1*SD_WAKE_AFFINE \ 77 77 | 0*SD_PREFER_LOCAL \ 78 78 | 0*SD_SHARE_CPUPOWER \ 79 79 | 0*SD_POWERSAVINGS_BALANCE \