Re: [PATCH sched_ext/for-6.14-fixes] sched_ext: selftests/dsp_local_on: Fix sporadic failures

From: Tejun Heo
Date: Mon Jan 27 2025 - 13:45:42 EST


On Sat, Jan 25, 2025 at 05:54:23AM +0100, Andrea Righi wrote:
...
> > - if (p->nr_cpus_allowed == nr_cpus)
> > + if (p->nr_cpus_allowed == nr_cpus && !p->migration_disabled)
>
> This doesn't work with !CONFIG_SMP, maybe we can introduce a helper like:
>
> static bool is_migration_disabled(const struct task_struct *p)
> {
> if (bpf_core_field_exists(p->migration_disabled))
> return p->migration_disabled;
> return false;

Ah, right. Would you care to send the patch?

Thanks.

--
tejun