Commit 571f6d2f authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

[PATCH] sched: avoid taking 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: default avatarChristoph Lameter <clameter@sgi.com>
Cc: Peter Williams <pwil3058@bigpond.net.au>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ac7d5504
...@@ -2915,6 +2915,9 @@ static inline int wake_priority_sleeper(struct rq *rq) ...@@ -2915,6 +2915,9 @@ static inline int wake_priority_sleeper(struct rq *rq)
int ret = 0; int ret = 0;
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
if (!rq->nr_running)
return 0;
spin_lock(&rq->lock); spin_lock(&rq->lock);
/* /*
* If an SMT sibling task has been put to sleep for priority * If an SMT sibling task has been put to sleep for priority
......
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