Re: [patch V3 06/20] sched/mmcid: Prevent pointless work in mm_update_cpus_allowed()
From: Mathieu Desnoyers
Date: Wed Oct 29 2025 - 11:45:28 EST
On 2025-10-29 09:09, Thomas Gleixner wrote:
mm_update_cpus_allowed() is not required to be invoked for affinity changes
due to migrate_disable() and migrate_enable().
migrate_disable() restricts the task temporarily to a CPU on which the task
was already allowed to run, so nothing changes. migrate_enable() restores
the actual task affinity mask.
If that mask changed between migrate_disable() and migrate_enable() then
that change was already accounted for.
Move the invocation to the proper place to avoid that.
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com