[PATCH 3/4] SCHED: Don't use BKL count for idle preempt count initialization

From: Andi Kleen
Date: Fri May 06 2011 - 17:06:14 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

No need for that ever as far as I can see. Just set it to 0.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
kernel/sched.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 7fa5334..f70b2cc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5776,11 +5776,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
raw_spin_unlock_irqrestore(&rq->lock, flags);

/* Set the preempt count _outside_ the spinlocks! */
-#if defined(CONFIG_PREEMPT)
- task_thread_info(idle)->preempt_count = (idle->lock_depth >= 0);
-#else
task_thread_info(idle)->preempt_count = 0;
-#endif
+
/*
* The idle tasks have their own, simple scheduling class:
*/
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/