Peter Zijlstra 1b12bbc747 lockdep: re-annotate scheduler runqueues
Instead of using a per-rq lock class, use the regular nesting operations.

However, take extra care with double_lock_balance() as it can release the
already held rq->lock (and therefore change its nesting class).

So what can happen is:

 spin_lock(rq->lock);	// this rq subclass 0

 double_lock_balance(rq, other_rq);
   // release rq
   // acquire other_rq->lock subclass 0
   // acquire rq->lock subclass 1

 spin_unlock(other_rq->lock);

leaving you with rq->lock in subclass 1

So a subsequent double_lock_balance() call can try to nest a subclass 1
lock while already holding a subclass 1 lock.

Fix this by introducing double_unlock_balance() which releases the other
rq's lock, but also re-sets the subclass for this rq's lock to 0.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-11 09:30:22 +02:00
..
2008-07-26 12:00:07 -07:00
2008-07-28 23:32:00 +02:00
2008-07-23 17:47:32 -07:00
2008-07-28 23:32:00 +02:00
2008-07-25 10:53:38 -07:00
2008-07-26 20:53:20 -04:00
2008-07-28 16:30:21 -07:00
2008-07-26 12:00:04 -07:00
2008-06-24 10:52:55 -05:00
2008-07-26 12:00:09 -07:00
2008-07-02 15:06:24 -06:00
2008-07-25 10:53:29 -07:00
2008-07-26 12:00:09 -07:00
2008-07-26 12:00:09 -07:00
2008-07-26 12:00:04 -07:00
2008-07-25 10:53:45 -07:00
2008-07-27 09:45:34 -07:00