Commit fcb99371 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] lockdep: annotate scheduler runqueue locks

Teach per-CPU runqueue locks and recursive locking code to the lock validator.
 Has no effect on non-lockdep kernels.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d730e882
...@@ -266,6 +266,7 @@ struct runqueue { ...@@ -266,6 +266,7 @@ struct runqueue {
unsigned long ttwu_cnt; unsigned long ttwu_cnt;
unsigned long ttwu_local; unsigned long ttwu_local;
#endif #endif
struct lock_class_key rq_lock_key;
}; };
static DEFINE_PER_CPU(struct runqueue, runqueues); static DEFINE_PER_CPU(struct runqueue, runqueues);
...@@ -6656,6 +6657,7 @@ void __init sched_init(void) ...@@ -6656,6 +6657,7 @@ void __init sched_init(void)
rq = cpu_rq(i); rq = cpu_rq(i);
spin_lock_init(&rq->lock); spin_lock_init(&rq->lock);
lockdep_set_class(&rq->lock, &rq->rq_lock_key);
rq->nr_running = 0; rq->nr_running = 0;
rq->active = rq->arrays; rq->active = rq->arrays;
rq->expired = rq->arrays + 1; rq->expired = rq->arrays + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment