Messages in this thread | | | Date | Tue, 16 Aug 2016 09:57:21 +0200 | From | Richard Cochran <> | Subject | Re: [patch 4 14/22] timer: Switch to a non cascading wheel |
| |
On Fri, Aug 12, 2016 at 01:50:16PM -0400, Rik van Riel wrote: > Could that cause the new timer wheel code to skip over > timer buckets occasionally, or is this hypothesis bunk?
The new wheel is not different from the old one in this respect. Each base keeps its own jiffies counter. When returning from a long sleep, the base counter can be behind the current jiffies value by more than one. In __run_timers() we loop through all the missed jiffies:
while (time_after_eq(jiffies, base->clk)) {
levels = collect_expired_timers(base, heads); base->clk++;
while (levels--) expire_timers(base, heads + levels); }
So the hypothesis is incorrect.
Thanks, Richard
| |