Evaluate potential use of high-res waitable timers in TimerThread
Categories
(Core :: Performance Engineering, task)
Tracking
()
People
(Reporter: jlink, Unassigned)
References
(Blocks 1 open bug)
Details
Bug 1881627 involves finding a good way to ensure that timers fire when they "need" to without using extra resources to fire more precisely than what is really needed.
The way this would work (use high resolution timers to wake up precisely when needed and low resolution timers when precise firing is not needed) seems similar to what Windows high-resolution waitable timers might be doing, so the purpose of this work is to investigate whether these timers can and should be used to implement this functionality.
Reporter | ||
Comment 2•1 month ago
|
||
Clear and specific information on what exactly you get with high-resolution Windows timers is a bit difficult to find (probably because Microsoft still wants to maintain some flexibility in behavior) but it seems to at least handle the dynamic adjustment of timer frequency. It is also reasonable to expect that their implementation could have an advantage over what we could/would roll ourselves (both because Windows could have access to additional low-level information that it could take advantage of and because Microsoft could continue to invest resources into optimizing this behavior).
As a result, and after a quick chat with Jeff and Markus, the plan is to try using high-res waitable timers on Windows as the mechanism for waking/sleeping TimerThread.
Description
•