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)

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) +

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, > +

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(_base->lock); > > > - spin_lock(_base->lock); > > > + /* > > > + * If we take a

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(_base->lock); > > - spin_lock(_base->lock); > > + /* > > +* If we take a lock from a different cpu, make sure we have always > > +* the same locking order.

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

2007-03-02 Thread Ingo Molnar
* Heiko Carstens <[EMAIL PROTECTED]> wrote: > - spin_lock(_base->lock); > - spin_lock(_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 the

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 the lowest

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 order. That is

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 take a lock from a

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, +

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) +