Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
SCX: Synchronize boot CPU's online state with SCX_RQ_ONLINE
Browse files Browse the repository at this point in the history
We weren't synchronizing the boot CPU's online state with scx_rq's online
state. This however was getting hidden through the RQ_ONOFF_TOPOLOGY update
calls. 3a44769 ("scx: Replace scx_cpu_online percpu var with
SCX_RQ_ONLINE flag") masked RQ_ONOFF_TOPOLOGY calls leaving the boot CPU
marked offline from SCX's POV always forcing the CPU into local bypass mode,
likely leading to reported interactivity problems on scx_rusty.

Fix it by synchronizing SCX_RQ_ONLINE with CPU's online states in
init_sched_ext_class().
  • Loading branch information
htejun committed May 28, 2024
1 parent 7648df7 commit 10d167d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/sched/ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -5741,6 +5741,9 @@ void __init init_sched_ext_class(void)
BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_preempt, GFP_KERNEL));
BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_wait, GFP_KERNEL));
init_irq_work(&rq->scx.kick_cpus_irq_work, kick_cpus_irq_workfn);

if (cpu_online(cpu))
cpu_rq(cpu)->scx.flags |= SCX_RQ_ONLINE;
}

register_sysrq_key('S', &sysrq_sched_ext_reset_op);
Expand Down

0 comments on commit 10d167d

Please sign in to comment.