summaryrefslogtreecommitdiff
path: root/tools/perf/bench/futex-requeue.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2016-10-24 23:56:52 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-10-25 15:50:47 +0300
commite2e1680fda1573ebfdd6bba5d58f978044746993 (patch)
treebb48b64d2f133ca7ea7b3a84305b3bdb4cb03b5a /tools/perf/bench/futex-requeue.c
parent76e2d2617d767c445498c4c4b1162eb2201cdd77 (diff)
downloadlinux-e2e1680fda1573ebfdd6bba5d58f978044746993.tar.xz
perf bench futex: Avoid worker cacheline bouncing
Sebastian noted that overhead for worker thread ops (throughput) accounting was producing 'perf' to appear in the profiles, consuming a non-trivial (i.e. 13%) amount of CPU. This is due to cacheline bouncing due to the increment of w->ops. We can easily fix this by just working on a local copy and updating the actual worker once done running, and ready to show the program summary. There is no danger of the worker being concurrent, so we can trust that no stale value is being seen by another thread. This also gets rid of the unnecessary cache alignment hack; its not worth it. Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: http://lkml.kernel.org/r/1477342613-9938-2-git-send-email-dave@stgolabs.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench/futex-requeue.c')
0 files changed, 0 insertions, 0 deletions