lkml.org 
[lkml]   [2010]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] sched: enforce per-cpu utilization limits on runtime balancing
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Thu, Feb 25, 2010 09:28:24PM +0100
>
> On Tue, 2010-02-23 at 19:56 +0100, Fabio Checconi wrote:
> > +static inline void double_spin_lock(raw_spinlock_t *lock1,
> > + raw_spinlock_t *lock2)
> > + __acquires(lock1)
> > + __acquires(lock2)
> > +{
> > + if (lock1 < lock2) {
> > + raw_spin_lock(lock1);
> > + raw_spin_lock_nested(lock2, SINGLE_DEPTH_NESTING);
> > + } else {
> > + raw_spin_lock(lock2);
> > + raw_spin_lock_nested(lock1, SINGLE_DEPTH_NESTING);
> > + }
> > +}
> > +
> > +static inline void double_spin_unlock(raw_spinlock_t *lock1,
> > + raw_spinlock_t *lock2)
> > + __releases(lock1)
> > + __releases(lock2)
> > +{
> > + raw_spin_unlock(lock1);
> > + lock_set_subclass(&lock2->dep_map, 0, _RET_IP_);
> > + raw_spin_unlock(lock2);
> > +}
>
> If you release both there is no need to re-set the subclass.

Will fix, thanks.


\
 
 \ /
  Last update: 2010-03-03 17:49    [W:0.093 / U:0.868 seconds]
©2003-2014 Jasper Spaans. Advertise on this site