]> git.baikalelectronics.ru Git - kernel.git/commit
perf bench futex: Sync waker threads
authorJames Yang <james.yang@arm.com>
Mon, 27 Nov 2017 04:21:01 +0000 (20:21 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Dec 2017 13:23:44 +0000 (10:23 -0300)
commitd339509d0c9cf6e18a4430ed67c9b739c2f18c58
tree0e126a5c26338d3997f44794f58db0e427e0c80a
parent7b43bae2326398ffc58ea725c26f96744b680e51
perf bench futex: Sync waker threads

Waker threads in the futex wake-parallel benchmark are started by a loop
using pthread_create().  However, there is no synchronization for when
the waker threads wake the waiting threads.  Comparison of the waker
threads' measurement timestamps show they are not all running
concurrently because older waker threads finish their task before newer
waker threads even start.

This patch uses a barrier to better synchronize the waker threads.

Signed-off-by: James Yang <james.yang@arm.com
Cc: Kim Phillips <kim.phillips@arm.com>
Link: http://lkml.kernel.org/r/20171127042101.3659-4-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
[ Disable the wake-parallel test for systems without pthread_barrier_t ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/futex-wake-parallel.c