diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 10:22:02 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 11:41:26 +0200 |
commit | 514e0e295511c6a4a54eb0228ccbb519162cc088 (patch) | |
tree | 8787cdc7e2fc3e19335b3c29bbb4cdceae549f97 /init | |
parent | 030dc4adec445a7a670ef7a4ef664f83f3943c30 (diff) | |
download | lwn-514e0e295511c6a4a54eb0228ccbb519162cc088.tar.gz lwn-514e0e295511c6a4a54eb0228ccbb519162cc088.zip |
sched: Debug missed preemption checks
Developers use preempt_enable_no_resched() in places where the code
calls schedule() immediately which is correct. But there are places
where preempt_enable_no_resched() is not followed by schedule().
Add debug infrastructre to find the offending code. The identified
correct users are converted to use __preempt_enable_no_resched().
For the ever repeating "preempt_enable_no_resched(); schedule();"
sequences a onvenience macro preempt_enable_and_schedule() is
introduced.
Based on a previous patch from Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c index 2c5ade79eb81..252f448d8b9d 100644 --- a/init/main.c +++ b/init/main.c @@ -463,8 +463,7 @@ static noinline void __init_refok rest_init(void) */ init_idle_bootup_task(current); rcu_scheduler_starting(); - preempt_enable_no_resched(); - schedule(); + preempt_enable_and_schedule(); preempt_disable(); /* Call into cpu_idle with preempt disabled */ |