diff options
author | Thomas Gleixner <[email protected]> | 2015-05-26 22:50:26 +0000 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2015-06-19 15:18:27 +0200 |
commit | 1bd04bf6f68d65f5422b2b85c495d65d49587a54 (patch) | |
tree | 3793d20caa706178973d53c4aa75599480ed9051 | |
parent | 3bb475a3446facd0425d3f2fe7e85bf03c5c6c05 (diff) |
timer: Remove FIFO "guarantee"
The FIFO guarantee is only there if two timers are queued into the
same bucket at the same jiffie on the same cpu:
- The slack value depends on the delta between expiry and enqueue
time, so the resulting expiry time can be different for timers
which are queued in different jiffies.
- Timers which are queued into the secondary array end up after a
later queued timer which was queued into the primary array due to
cascading.
- Timers can end up on different cpus due to the NOHZ target moving
around. Obviously there is no guarantee of expiry ordering between
cpus.
So anything which relies on FIFO behaviour of the timer wheel is
broken already.
This is a preparatory patch for converting the timer wheel to hlist
which reduces the memory foot print of the wheel by 50%.
It's a seperate patch so any (unlikely to happen) regression caused by
this can be identified clearly.
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Viresh Kumar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul McKenney <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Joonwoo Park <[email protected]>
Cc: Wenbo Wang <[email protected]>
Cc: George Spelvin <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r-- | kernel/time/timer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index d5e017970ac7..e212df24ad3f 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -389,10 +389,8 @@ __internal_add_timer(struct tvec_base *base, struct timer_list *timer) i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK; vec = base->tv5.vec + i; } - /* - * Timers are FIFO: - */ - list_add_tail(&timer->entry, vec); + + list_add(&timer->entry, vec); } static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) |