diff options
| author | Andrea Righi <arighi@nvidia.com> | 2025-01-25 10:36:07 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-22 12:56:59 -0700 |
| commit | f52913f0888b9d40a015b7c626b5829870ffdffb (patch) | |
| tree | 5388deaa6891dc2023839f99802bd1ed03de109c /tools | |
| parent | ca24634fc58a2271c0a6e0f34b93bcbd1ffe4343 (diff) | |
| download | linux-f52913f0888b9d40a015b7c626b5829870ffdffb.tar.gz linux-f52913f0888b9d40a015b7c626b5829870ffdffb.tar.bz2 linux-f52913f0888b9d40a015b7c626b5829870ffdffb.zip | |
sched_ext: selftests/dsp_local_on: Fix selftest on UP systems
commit 3c7d51b0d29954c40ea3a097e0ec7884b4344331 upstream.
In UP systems p->migration_disabled is not available. Fix this by using
the portable helper is_migration_disabled(p).
Fixes: e9fe182772dc ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/sched_ext/dsp_local_on.bpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c b/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c index 758b479bd1ee..c02b2aa6fc64 100644 --- a/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c +++ b/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c @@ -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); |
