Re: [patch V2 12/20] timer: Switch to a non cascading wheel
From: Thomas Gleixner
Date: Fri Jun 24 2016 - 06:08:22 EST
On Sat, 18 Jun 2016, George Spelvin wrote:
> Looking at the __next_timer_interrupt function, it seems that it does
> a lot more work than necessary. Once a timeout has been found in the
> current level, the range which must be searched in the following level
> is limited to 1/LVL_CLK_DIV of the range in the current level.
>
> That quickly tapers off to zero and the search can stop.
>
> In particular, if a timeout is found at level 0 between the immediately
> next bucket and the next bucket which is a multiple of LEVEL_SHIFT_DIV,
> inclusive (1 <= x <= 8 buckets depending on the sbits of base->clk),
> then the search can stop immediately.
Correct. Thought about that, but never came around to implement it.
> This is hairy code and the following untested code is probably buggy,
> but the basic idea is:
It's buggy, but yes the idea is sane. We can do this as an incremental change
once we agreed on the general idea.
Thanks,
tglx