mystikos
mystikos copied to clipboard
perf: host notifications for waking threads
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.