Skip to content
Commit 9f72daf7 authored by Nicolas Saenz Julienne's avatar Nicolas Saenz Julienne Committed by Tejun Heo
Browse files

cgroup/cpuset: Avoid memory migration when nodemasks match



With the introduction of ee9707e8 ("cgroup/cpuset: Enable memory
migration for cpuset v2") attaching a process to a different cgroup will
trigger a memory migration regardless of whether it's really needed.
Memory migration is an expensive operation, so bypass it if the
nodemasks passed to cpuset_migrate_mm() are equal.

Note that we're not only avoiding the migration work itself, but also a
call to lru_cache_disable(), which triggers and flushes an LRU drain
work on every online CPU.

Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzju@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent ee9707e8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment