Avoid taking the rq lock in wake_priority sleeper Avoid taking the request queue lock in wake_priority_sleeper if there are no running processes. Signed-off-by: Christoph Lameter Index: linux-2.6.19-rc3/kernel/sched.c =================================================================== --- linux-2.6.19-rc3.orig/kernel/sched.c 2006-10-26 21:30:11.328325096 -0500 +++ linux-2.6.19-rc3/kernel/sched.c 2006-10-27 11:58:02.142767971 -0500 @@ -2898,6 +2898,9 @@ static inline int wake_priority_sleeper( int ret = 0; #ifdef CONFIG_SCHED_SMT + if (!rq->nr_running) + return 0; + spin_lock(&rq->lock); /* * If an SMT sibling task has been put to sleep for priority