Skip to content
Commit 8085e5ab authored by James Yang's avatar James Yang Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarJames 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: default avatarDavidlohr Bueso <dave@stgolabs.net>
[ Disable the wake-parallel test for systems without pthread_barrier_t ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 25ab5abf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment