[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1268563128-6486-11-git-send-email-mitake@dcl.info.waseda.ac.jp>
Date: Sun, 14 Mar 2010 19:38:47 +0900
From: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
To: fweisbec@...il.com
Cc: linux-kernel@...r.kernel.org, mitake@....info.waseda.ac.jp,
h.mitake@...il.com, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jens Axboe <jens.axboe@...cle.com>,
Jason Baron <jbaron@...hat.com>
Subject: [PATCH RFC 10/11] Adopt kernel/sched.c to lock monitor
There are some points of directly calling the macros spin_{acquire, release}()
and the function lock_set_subclass() in kernel/sched.c.
Now spinlock_t doesn't have struct lockdep_map,
so this patch fixes them with the rule of lock monitor.
Signed-off-by: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jens Axboe <jens.axboe@...cle.com>
Cc: Jason Baron <jbaron@...hat.com>
---
kernel/sched.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 7266b91..6c8a52e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -891,7 +891,7 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev)
* fix up the runqueue lock - which gets 'carried over' from
* prev into current:
*/
- spin_acquire(&rq->lock.dep_map, 0, 0, _THIS_IP_);
+ spin_acquire(&rq->lock.monitor, 0, 0, _THIS_IP_);
raw_spin_unlock_irq(&rq->lock);
}
@@ -1803,7 +1803,7 @@ static inline void double_unlock_balance(struct rq *this_rq, struct rq *busiest)
__releases(busiest->lock)
{
raw_spin_unlock(&busiest->lock);
- lock_set_subclass(&this_rq->lock.dep_map, 0, _RET_IP_);
+ lock_set_subclass(&this_rq->lock.monitor.dep_map, 0, _RET_IP_);
}
#endif
@@ -2905,7 +2905,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
* do an early lockdep release here:
*/
#ifndef __ARCH_WANT_UNLOCKED_CTXSW
- spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
+ spin_release(&rq->lock.monitor, 1, _THIS_IP_);
#endif
/* Here we just switch the register state and the stack. */
@@ -6725,7 +6725,7 @@ SYSCALL_DEFINE0(sched_yield)
* no need to preempt or enable interrupts:
*/
__release(rq->lock);
- spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
+ spin_release(&rq->lock.monitor, 1, _THIS_IP_);
do_raw_spin_unlock(&rq->lock);
preempt_enable_no_resched();
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists