diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-02-22 13:56:26 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-02-22 13:56:26 -0800 |
commit | 6560692c670bcf34fc922474bf37f3c18b8768af (patch) | |
tree | 551dd7bd544c2db42f34b92bfaf368744bcc525f /blas | |
parent | 0b25a5c431f2764cd46a04f07536d60256ecd256 (diff) |
Improve EventCount used by the non-blocking threadpool.
The current algorithm requires threads to commit/cancel waiting in order
they called Prewait. Spinning caused by that serialization can consume
lots of CPU time on some workloads. Restructure the algorithm to not
require that serialization and remove spin waits from Commit/CancelWait.
Note: this reduces max number of threads from 2^16 to 2^14 to leave
more space for ABA counter (which is now 22 bits).
Implementation details are explained in comments.
Diffstat (limited to 'blas')
0 files changed, 0 insertions, 0 deletions