Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve threads performance when running under rr (JuliaLang#35527)
Partr does a user space busy loop when no events are found (until some timeout expires), in the expectation that another thread might push some. When running under rr, all execution is serialized, so there's no other thread running simultaneously, and rr will happily let the thread busy loop until its timeslice (50ms or so) is expired. The result is a dramatic performance decrease in the threads test that is entirely unnecessary (even during regular execution it's not clear that busy waiting makes much sense on low-core CPUs, since we're potentially starving another thread of the execution time it needs to actually schedule some work). For now, just detect that we're running under rr and stop doing any sort of busy waiting in that case.
- Loading branch information