New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timer: reduce interference between timer sessions #5138
Comments
This data structure uses an AVL tree to maintain a time-sorted set of alarm objects. It supports the use of circular clocks of an bit width. Issue genodelabs#5138
My timer branch (https://github.com/nfeske/genode/commits/timer/) contains my first take of the new implementation, tested via pkg/test-timer as well as sculpt.run (on Qemu). I haven't tested it with the audio scenario yet. On Sculpt on Qemu, once the system has settled, top shows a similar load as the original version. Upon closer inspection, most of the load seems to be induced by the ahci-1.fs server, which calls |
This data structure uses an AVL tree to maintain a time-sorted set of alarm objects. It supports the use of circular clocks of an bit width. Issue genodelabs#5138
Version nfeske@c8a05b2 replaces the RPC-based synchronization by a simple locking scheme, which is a little bit faster and alleviates the need for the component-internal RPC interface. To quantify the performance change, I tested the idle load with Sculpt on an x250, which is pretty much influenced by the timer.
|
After testing the waveform_player.run script on my x250, I'm happy to report that the new timer indeed solves the cross-session interference problem. |
This data structure uses an AVL tree to maintain a time-sorted set of alarm objects. It supports the use of circular clocks of an bit width. Issue #5138
Commit 6a36ab5 contains the new version of the base-hw timer. |
In the context of #5138, the timer drivers for NOVA and base-hw had been changed to support timeouts at a precision of 250 us (from formerly 1 ms). Adjust the test to the new expected lower bound.
…epot_autopilot) Issue genodelabs#5138
This data structure uses an AVL tree to maintain a time-sorted set of alarm objects. It supports the use of circular clocks of an bit width. Issue #5138
In the context of #5138, the timer drivers for NOVA and base-hw had been changed to support timeouts at a precision of 250 us (from formerly 1 ms). Adjust the test to the new expected lower bound.
I finished the adjusted pit timer implementation. run/timeout on Qemu succeed for me on Qemu for sel4, okl4 and pistachio. |
Nice! Thanks @alex-ab for the new implementation, which I merged to staging just now. Curious to see how it fares for the other scenarios. |
The work on the time-driven new audio infrastructure (#5097) uncovered an unexpected degree of interference between timer clients. This observation prompted me to reconsider the current timer implementation(s). I'd like to achieve the following:
Each timer should have a top-level
Main
object that ties all platform-specific ingredients together. This will each driver much easier to understand and to modify.The timer drivers should only use real clocks, no interpolated time. This will remove a source of uncertainty from the operation of the timer.
The deliberate limiting of the time resolution should be applied only to the programming of timeouts by the timer driver. It should not be applied to the querying of time. This will improve the precision of calculations based on these values at the client side (e.g., the mixer's observation of client periods).
The timer driver should try batching the wake-up of clients that have timeouts closely clustered together.
On NOVA, the number of kernel interactions could probably be reduced.
I will turn my immediate attention to the NOVA timer driver.
The text was updated successfully, but these errors were encountered: