]> git.baikalelectronics.ru Git - kernel.git/commit
perf bench futex: Cache align the worker struct
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 16 Oct 2016 19:08:02 +0000 (21:08 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Oct 2016 14:07:45 +0000 (11:07 -0300)
commit3a1fdd8af12a33421c695c7628ae0813e0346e27
tree266d4c9ebb091a9bcc6f7b2268ef13abf0125ed3
parent36b69a40665837cc7dc24fecfa0835200cd9e7ce
perf bench futex: Cache align the worker struct

It popped up in perf testing that the worker consumes some amount of
CPU. It boils down to the increment of `ops` which causes cache line
bouncing between the individual threads.

This patch aligns the struct by 256 bytes to ensure that not a cache
line is shared among CPUs. 128 byte is the x86 worst case and grep says
that L1_CACHE_SHIFT is set to 8 on s390.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20161016190803.3392-1-bigeasy@linutronix.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/futex-hash.c