Skip to content

Commit 571f6d2

Browse files
Christoph LameterLinus Torvalds
authored andcommitted
[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]>
1 parent ac7d550 commit 571f6d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/sched.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2915,6 +2915,9 @@ static inline int wake_priority_sleeper(struct rq *rq)
29152915
int ret = 0;
29162916

29172917
#ifdef CONFIG_SCHED_SMT
2918+
if (!rq->nr_running)
2919+
return 0;
2920+
29182921
spin_lock(&rq->lock);
29192922
/*
29202923
* If an SMT sibling task has been put to sleep for priority

0 commit comments

Comments
 (0)