mystikos icon indicating copy to clipboard operation
mystikos copied to clipboard

perf: host notifications for waking threads

Open paulcallen opened this issue 3 years ago • 0 comments

We wake threads for futex wake broadcasts, as well as during thread/process shutdown. If we can send an array of threads to wake instead of individual calls per-thread we may be able to get some perf improvements. There are probably a load of other perf issues with waking 1000 threads at the same time, but it should not take multiple seconds!

From a pthread tests, I updated the thread exhaustion test to instead of sleeping to do condition wait (although futex would have worked and I should have probably used that!) The wake of 1000 conditional variables (doing a broadcast wake) took multiple seconds to complete.

paulcallen avatar Nov 24 '21 17:11 paulcallen