You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve threads performance when running under rr (#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.
0 commit comments