Re: [PATCH v3] sched: Reset cpumask if __migrate_task() failed for migration_cpu_stop()
From: Sebastian Andrzej Siewior
Date: Thu Dec 03 2026 - 09:19:57 EST
On 2026-12-03 14:05:19 [+0100], Peter Zijlstra wrote:
> The below patch boots without burning the machine down.
It seems to work, I don't see any fallout.
…
> @@ -11326,7 +11314,7 @@ static int sched_non_preferred_cpu_push_
> update_rq_clock(rq);
>
> if (task_rq(p) == rq && task_on_rq_queued(p)) {
There is now a
!is_migration_disabled(p))
here in tree as of rc5
> - struct rq *dest_rq = __migrate_task(rq, &rf, p, cpu);
> + struct rq *dest_rq = move_queued_task(rq, &rf, p, cpu);
>
> if (rq != dest_rq)
> schedstat_inc(p->stats.nr_migrations_cpu_non_preferred);
Sebastian