[Bug libgomp/79784] Synchronization overhead is thrashing on Aarch64
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 2 07:39:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79784
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Or the case the futex syscall is returning right away ...
The spinning is completely configurable, see the documented OMP_WAIT_POLICY
(standard) and GOMP_SPINCOUNT environment variables. How much spinning is
desirable depends on the workload, how many cores/threads are busy in the app,
how many cores/threads there are, what other programs are running on the box.
Decreasing the spincount can result in severe latency degradation.
And, if some threads don't have anything to do anymore and are just waiting for
other threads, then spending time in the spinning loops or waiting on futex
depending on the above mentioned setting is the only thing it can do, so
obviously you see a lot of that.
More information about the Gcc-bugs
mailing list