mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] sched: fix SMT scheduler bug
The SMT scheduler incorrectly skips kernel threads even if they are runnable (but they are preempted by a higher-prio user-space task which got SMT-delayed by an even higher-priority task running on a sibling CPU). Fix this for now by only doing the SMT-nice optimization if the to-be-delayed task is the only runnable task. (This should cover most of the real-life cases anyway.) This bug has been in the SMT scheduler since 2.6.17 or so, but has only been noticed now by the active check in the dynticks code. Signed-off-by: Ingo Molnar <[email protected]> Cc: Michal Piotrowski <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3f555c700b
commit
7355690ead
1 changed files with 1 additions and 1 deletions
|
|
@ -3547,7 +3547,7 @@ need_resched_nonpreemptible:
|
|||
}
|
||||
}
|
||||
next->sleep_type = SLEEP_NORMAL;
|
||||
if (dependent_sleeper(cpu, rq, next))
|
||||
if (rq->nr_running == 1 && dependent_sleeper(cpu, rq, next))
|
||||
next = rq->idle;
|
||||
switch_tasks:
|
||||
if (next == rq->idle)
|
||||
|
|
|
|||
Loading…
Reference in a new issue