Closed nfeske closed 2 months ago
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 trigger_once
about 200 times per second.
Version https://github.com/nfeske/genode/commit/c8a05b2a5b45ece959c56b42325d4a916d17781c 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.
Commit https://github.com/genodelabs/genode/commit/6a36ab585ea5fbacafa704291b4d4114524bc113 contains the new version of the base-hw timer.
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.
@nfeske: I updated the fiasco timer, please have a look, works for me on qemu with run/timeout and run/timer_accuarcy
Thanks a lot @alex-ab! The new version looks very nice. Merged to staging.
@nfeske: the adjusted foc and linux timers are available
Thanks @alex-ab, very much appreciated!
@nfeske, @skalk: as discussed, i removed the old timer driver for epit from repos/base and repos/base-sel4 with a30e88f5a211aa9798c9adb6ac50e524ae510129 and re-added the new to the imx repo https://github.com/alex-ab/genode-imx/commit/ff903b35b86bbe3361b84816cb7d33af80a0064e. The old server side timer infrastructure seems not to be used now anymore, so 8c97e258a356ea797c9dc349920604b2c16b648e removes the code.
I merged the epit commits to the respective staging branches. Thanks a lot @alex-ab for the so nicely wrapping up this transition.
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.