Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-04 Thread Matt Mackall
On Fri, Mar 02, 2007 at 11:47:52PM +0100, Heiko Carstens wrote: > /* > + * Locks two spinlocks l1 and l2. > + * l1_first indicates if spinlock l1 should be taken first. > + */ > +static inline void double_spin_lock(spinlock_t *l1, spinlock_t *l2, > + bool l1_first)

[patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Heiko Carstens
From: Heiko Carstens <[EMAIL PROTECTED]> Doing something like this on a two cpu system # echo 0 > /sys/devices/system/cpu/cpu0/online # echo 1 > /sys/devices/system/cpu/cpu0/online # echo 0 > /sys/devices/system/cpu/cpu1/online will give me this: =

Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Heiko Carstens
> > +/* > > + * double_timer_lock/unlock are used to ensure that on cpu hotplug the > > + * per cpu timer locks are always taken in the same order. > > + */ > > +static void __devinit double_timer_lock(tvec_base_t *base1, > > + tvec_base_t *base2, int ind) > > +

Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Andrew Morton
On Fri, 2 Mar 2007 20:08:36 +0100 Heiko Carstens <[EMAIL PROTECTED]> wrote: > +/* > + * double_hrtimer_lock/unlock are used to ensure that on cpu hotplug the > + * per cpu timer locks are always taken in the same order. > + */ > +static void double_hrtimer_lock(struct hrtimer_cpu_base *base1, > +

[patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Heiko Carstens
From: Heiko Carstens <[EMAIL PROTECTED]> Doing something like this on a two cpu system # echo 0 > /sys/devices/system/cpu/cpu0/online # echo 1 > /sys/devices/system/cpu/cpu0/online # echo 0 > /sys/devices/system/cpu/cpu1/online will give me this: =

Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Andrew Morton
On Fri, 2 Mar 2007 15:23:08 +0100 Heiko Carstens <[EMAIL PROTECTED]> wrote: > On Fri, Mar 02, 2007 at 02:04:33PM +0100, Ingo Molnar wrote: > > > > * Heiko Carstens <[EMAIL PROTECTED]> wrote: > > > > > - spin_lock(&new_base->lock); > > > - spin_lock(&old_base->lock); > > > + /* > > > + * If we t

Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Heiko Carstens
On Fri, Mar 02, 2007 at 02:04:33PM +0100, Ingo Molnar wrote: > > * Heiko Carstens <[EMAIL PROTECTED]> wrote: > > > - spin_lock(&new_base->lock); > > - spin_lock(&old_base->lock); > > + /* > > +* If we take a lock from a different cpu, make sure we have always > > +* the same locking

Re: [patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Ingo Molnar
* Heiko Carstens <[EMAIL PROTECTED]> wrote: > - spin_lock(&new_base->lock); > - spin_lock(&old_base->lock); > + /* > + * If we take a lock from a different cpu, make sure we have always > + * the same locking order. That is the lock that belongs to the cpu > + * with th

[patch] timer/hrtimer: take per cpu locks in sane order

2007-03-02 Thread Heiko Carstens
Doing something like this on a two cpu system # echo 0 > /sys/devices/system/cpu/cpu0/online # echo 1 > /sys/devices/system/cpu/cpu0/online # echo 0 > /sys/devices/system/cpu/cpu1/online will give me this: === [ INFO: possible circular locki