mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 00:20:52 -05:00
sched, sched_ext: Disable SM_IDLE/rq empty path when scx_enabled()
Disable the rq empty path when scx is enabled. SCX must consult the BPF
scheduler (via the dispatch path in balance) to determine if rq is empty.
This fixes stalls when scx is enabled.
Signed-off-by: Pat Somaru <patso@likewhatevs.io>
Fixes: 3dcac251b0
("sched/core: Introduce SM_IDLE and an idle re-entry fast-path in __schedule()")
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
7ebd84d627
commit
edf1c586e9
1 changed files with 2 additions and 1 deletions
|
@ -6591,7 +6591,8 @@ static void __sched notrace __schedule(int sched_mode)
|
|||
*/
|
||||
prev_state = READ_ONCE(prev->__state);
|
||||
if (sched_mode == SM_IDLE) {
|
||||
if (!rq->nr_running) {
|
||||
/* SCX must consult the BPF scheduler to tell if rq is empty */
|
||||
if (!rq->nr_running && !scx_enabled()) {
|
||||
next = prev;
|
||||
goto picked;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue