]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/mmcid: Prevent pointless work in mm_update_cpus_allowed()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Nov 2025 17:26:55 +0000 (18:26 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 20 Nov 2025 11:14:54 +0000 (12:14 +0100)
commit0d032a43ebeb9bf255cd7e3dad5f7a6371571648
tree00474aaaa11bc937ac69b43829388f53160719f4
parentb08ef5fc8fa01ae5285bef5ff783bbb425d1fb08
sched/mmcid: Prevent pointless work in mm_update_cpus_allowed()

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.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251119172549.385208276@linutronix.de
kernel/sched/core.c