diff options
| author | Christoph Lameter <[email protected]> | 2006-12-10 02:20:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2006-12-10 09:55:42 -0800 |
| commit | 571f6d2fb0b1c04798df783db2ba85e96bcce43d (patch) | |
| tree | 09e90a5f4976ddfa35e93e90372413e2ef87060a /kernel | |
| parent | ac7d550499e225efb51a53d0b00667f26b93bdff (diff) | |
[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: Christoph Lameter <[email protected]>
Cc: Peter Williams <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: "Siddha, Suresh B" <[email protected]>
Cc: "Chen, Kenneth W" <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f04add905bdf..fdd26fffaa20 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2915,6 +2915,9 @@ static inline int wake_priority_sleeper(struct rq *rq) 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 |