Re: [RFC] Introduce greedy hrtimer walk on idle

From: Venki Pallipadi
Date: Fri Sep 23 2011 - 19:50:20 EST


On Fri, Sep 23, 2011 at 12:29 PM, Arjan van de Ven
<arjan@xxxxxxxxxxxxxxx> wrote:
> On 9/23/2011 11:54 AM, Venkatesh Pallipadi wrote:
>>
>> Current hrtimer range timers reduces the number of timer interrupts by
>> grouping together softexpired timers until the next unexpired timer.
>> It does not look at softexpired timers that may be after the unexpired
>> timer in the rbtree.
>>
>> Specifically, as the comment in hrtimer.c says
>>                         * The immediate goal for using the softexpires is
>>                         * minimizing wakeups, not running timers at the
>>                         * earliest interrupt after their soft expiration.
>>                         * This allows us to avoid using a Priority Search
>>                         * Tree, which can answer a stabbing querry for
>>                         * overlapping intervals and instead use the simple
>>                         * BST we already have.
>>                         * We don't add extra wakeups by delaying timers
>> that
>>                         * are right-of a not yet expired timer, because
>> that
>>                         * timer will have to trigger a wakeup anyway.
>>
>
>
> Since you found that it now makes a difference, I'm all for it..
> Acked-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
>
> (at original introduction it was in the noise, but usage patterns clearly
> changed a lot and ranges are much more prevalent now)
>
> I would not do the sysctl/configurability thing though.... that's not worth
> it.
>

Yes. I kept the sysctl there for this RFC, so that anyone testing this
can easily switch this on/off and measure the impact. Will remove it
in updates..

Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/