Skip to content

Commit 3c7d51b

Browse files
arighihtejun
authored andcommitted
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: e9fe182 ("sched_ext: selftests/dsp_local_on: Fix sporadic failures") Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 5f52bbf commit 3c7d51b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/sched_ext/dsp_local_on.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void BPF_STRUCT_OPS(dsp_local_on_dispatch, s32 cpu, struct task_struct *prev)
4343
if (!p)
4444
return;
4545

46-
if (p->nr_cpus_allowed == nr_cpus && !p->migration_disabled)
46+
if (p->nr_cpus_allowed == nr_cpus && !is_migration_disabled(p))
4747
target = bpf_get_prandom_u32() % nr_cpus;
4848
else
4949
target = scx_bpf_task_cpu(p);

0 commit comments

Comments
 (0)