RFC util/qemu-timer: Honor sub-ms poll timeouts on Darwin
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tests/bench: Add macos-pollbenchtests/ tests/ | +296 | 0 replies | |
| 2/2 | util/qemu-timer: Honor sub-ms poll timeouts on Darwinutil/ | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] util/qemu-timer: Honor sub-ms poll timeouts on Darwin
This series corrects a long-standing platform limitation:qemu_poll_ns() promises nanosecond timeouts, but Darwin’s g_poll() fallback rounds up to milliseconds, making sub-ms virtual timers fire late. Fixes the observable behavior.
Add a Darwin-only microbenchmark used to compare wait primitives and justify the chosen approach.
During the final sub-ms sleep, descriptors are not polled, so fd readiness can be delayed by up to <1 ms. This is still much better than whole-ms timer overshoot and avoids busy-waiting.
Philippe Mathieu-Daudé (2):
tests/bench: Add macos-pollbench util/qemu-timer: Honor sub-ms poll timeouts on Darwin
tests/bench/macos-pollbench.c | 290 ++++++++++++++++++++++++++++++++++ util/qemu-timer.c | 27 ++++ tests/bench/meson.build | 6 + 3 files changed, 323 insertions(+) create mode 100644 tests/bench/macos-pollbench.c
Signature · 1 line
2.55.0