Merge pull request #409 from sched-ext/bpfland-fix-idle-cpumask

scx_bpfland: use the right cpumask to find any idle CPU
This commit is contained in:
Andrea Righi 2024-07-01 21:37:35 +02:00 committed by GitHub
commit a72c9058a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -378,7 +378,7 @@ static s32 pick_idle_cpu(struct task_struct *p, s32 prev_cpu, u64 wake_flags)
* If all the previous attempts have failed, try to use any idle CPU in
* the system.
*/
cpu = bpf_cpumask_any_and_distribute(p->cpus_ptr, idle_smtmask);
cpu = bpf_cpumask_any_and_distribute(p->cpus_ptr, idle_cpumask);
if (bpf_cpumask_test_cpu(cpu, online_cpumask) &&
scx_bpf_test_and_clear_cpu_idle(cpu))
goto out_put_cpumask;