Skip to content

Allow waiting for timerfd to be interrupted during rts shutdown

Wander Hillen requested to merge WJWH/ghc:feature/quicker-shutdown-posix into master

Provides a fix for #22692 (closed), by switching from a blocking read() on a timerfd to a poll() of both the timerfd and a pipe. If the RTS is shutting down, it can write anything to the pipe and the poll() will return immediately instead of waiting for the next tick.

Informal measurement shows that it works, "hello world" now runs in ~2 ms instead of in ~11 ms, but I'm not sure how to measure this or test it for correctness. AFAICT the perf metrics in the CI only show allocation-based metrics?

Also not entirely sure where I can add something to the release notes as the template asks me to.

Merge request reports