Skip to content

Commit

Permalink
timers: allow deferrable timers for intervals tv2-tv5 to be deferred
Browse files Browse the repository at this point in the history
In the current kernel implementation only kernel timers for time interval
tv1 are being deferred. This patch allows any timer that is configured as
deferrable to be defer regardless of time interval.

This patch was previously discussed in
http://marc.info/?l=linux-kernel&m=123196343531966&w=2 and was acked by
Venki Pallipadi, the author of the original deferrable timer patch.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jon Hunter authored and Thomas Gleixner committed May 2, 2009
1 parent 091438d commit a041988
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,9 @@ static unsigned long __next_timer_interrupt(struct tvec_base *base)
index = slot = timer_jiffies & TVN_MASK;
do {
list_for_each_entry(nte, varp->vec + slot, entry) {
if (tbase_get_deferrable(nte->base))
continue;

found = 1;
if (time_before(nte->expires, expires))
expires = nte->expires;
Expand Down

0 comments on commit a041988

Please sign in to comment.