]> Git Repo - linux.git/blobdiff - kernel/sched/core.c
sched, sched_ext: Disable SM_IDLE/rq empty path when scx_enabled()
[linux.git] / kernel / sched / core.c
index b6cc1cf499d68e8c9244c7fe594aa6669ead8128..43e453ab7e20f81ea239919af19ef20c5358c93d 100644 (file)
@@ -6591,7 +6591,8 @@ static void __sched notrace __schedule(int sched_mode)
         */
        prev_state = READ_ONCE(prev->__state);
        if (sched_mode == SM_IDLE) {
         */
        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;
                }
                        next = prev;
                        goto picked;
                }
This page took 0.037563 seconds and 4 git commands to generate.