run_timer_tasklet() checks for expired local timers,
i think it is better to do it in run_local_timers()
before tasklet_schedule().
On top of timer-2.5.40-F7:
--- kernel/timer.c.orig Fri Oct 4 02:18:05 2002
+++ kernel/timer.c Fri Oct 4 02:53:02 2002
@@ -715,10 +715,7 @@
*/
static void run_timer_tasklet(unsigned long data)
{
- tvec_base_t *base = tvec_bases + smp_processor_id();
-
- if ((long)(jiffies - base->timer_jiffies) >= 0)
- __run_timers(base);
+ __run_timers((tvec_base_t*)data);
}
/*
@@ -726,7 +723,11 @@
*/
void run_local_timers(void)
{
- tasklet_hi_schedule(&per_cpu(timer_tasklet, smp_processor_id()));
+ int cpu = smp_processor_id();
+ tvec_base_t *base = tvec_bases + cpu;
+
+ if ((long)(jiffies - base->timer_jiffies) >= 0)
+ tasklet_hi_schedule(&per_cpu(timer_tasklet, cpu));
}
/*
@@ -1079,6 +1080,7 @@
}
for (j = 0; j < TVR_SIZE; j++)
INIT_LIST_HEAD(base->tv1.vec + j);
- tasklet_init(&per_cpu(timer_tasklet, i), run_timer_tasklet, 0);
+ tasklet_init(&per_cpu(timer_tasklet, i),
+ run_timer_tasklet, (unsigned long)base);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/