[Query]: hrtimers: why don't we consider hrtimers in get_next_timer_interrupt()
From: Viresh Kumar
Date: Wed Apr 23 2014 - 05:38:38 EST
Hi,
File: hrtimer.c
Function: hrtimer_get_next_event()
I was looking closely at what's waking up my system and
found this piece of code:
ktime_t hrtimer_get_next_event(void)
{
if (!hrtimer_hres_active()) {
find next hrtimer event ....
}
}
Which probably means that: "don't consider hrtimers for getting
next timer event if we are running ticks in high resolution mode".
And I couldn't understand why is it so?
When hres_active isn't set, we run hrtimer handlers from timer
handlers, which means that timers would be sufficient in finding
the next event and we don't need to check for hrtimers.
But when hres_active is set, hrtimers could be set to fire before
the next timer event and so we must take them into account.
I am new to this whole world of core frameworks and might be
missing something very very obvious. But its always better to
ask than to ignore and think that things are probably fine and
just shut up.
Thanks for your patience during my learning curve :)
--
viresh
--
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/