]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cpuset: migrate memory only for threadgroup leaders
authorTejun Heo <tj@kernel.org>
Fri, 11 Sep 2015 19:00:18 +0000 (15:00 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 22 Sep 2015 16:46:53 +0000 (12:46 -0400)
commit3df9ca0a2b8b50db5a079ae9d97c5b55435e9a6c
tree390c8b27ef61cca1d7d51b6372f545ac8b55cfcd
parent472912a2b5e2027efd58aa47f78acb2373675187
cpuset: migrate memory only for threadgroup leaders

If memory_migrate flag is set, cpuset migrates memory according to the
destnation css's nodemask.  The current implementation migrates memory
whenever any thread of a process is migrated making the behavior
somewhat arbitrary.  Let's tie memory operations to the threadgroup
leader so that memory is migrated only when the leader is migrated.

While this is a behavior change, given the inherent fuziness, this
change is not too likely to be noticed and allows us to clearly define
who owns the memory (always the leader) and helps the planned atomic
multi-process migration.

Note that we're currently migrating memory in migration path proper
while holding all the locks.  In the long term, this should be moved
out to an async work item.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
kernel/cpuset.c