ia64/xen-unstable

changeset 9827:b2323eefb79e

Avoid spurious timer activations in migrate_timer().

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Apr 22 10:37:24 2006 +0100 (2006-04-22)
parents 3145b215598c
children 1020c52c58c1
files xen/common/timer.c
line diff
     1.1 --- a/xen/common/timer.c	Sat Apr 22 10:26:28 2006 +0100
     1.2 +++ b/xen/common/timer.c	Sat Apr 22 10:37:24 2006 +0100
     1.3 @@ -251,12 +251,15 @@ void migrate_timer(struct timer *timer, 
     1.4      }
     1.5  
     1.6      if ( active_timer(timer) )
     1.7 +    {
     1.8          __stop_timer(timer);
     1.9 -
    1.10 -    timer->cpu = new_cpu;
    1.11 -
    1.12 -    if ( likely(!timer->killed) )
    1.13 +        timer->cpu = new_cpu;
    1.14          __add_timer(timer);
    1.15 +    }
    1.16 +    else
    1.17 +    {
    1.18 +        timer->cpu = new_cpu;
    1.19 +    }
    1.20  
    1.21      spin_unlock(&timers[old_cpu].lock);
    1.22      spin_unlock_irqrestore(&timers[new_cpu].lock, flags);