sched_ext: selftests/dsp_local_on: Fix selftest on UP systems
In UP systems p->migration_disabled is not available. Fix this by using
the portable helper is_migration_disabled(p).
Fixes: e9fe182772
("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
5f52bbf2f6
commit
3c7d51b0d2
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ void BPF_STRUCT_OPS(dsp_local_on_dispatch, s32 cpu, struct task_struct *prev)
|
|||
if (!p)
|
||||
return;
|
||||
|
||||
if (p->nr_cpus_allowed == nr_cpus && !p->migration_disabled)
|
||||
if (p->nr_cpus_allowed == nr_cpus && !is_migration_disabled(p))
|
||||
target = bpf_get_prandom_u32() % nr_cpus;
|
||||
else
|
||||
target = scx_bpf_task_cpu(p);
|
||||
|
|
Loading…
Add table
Reference in a new issue