diff options
| author | Waiman Long <longman@redhat.com> | 2026-07-02 17:47:53 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-07-06 14:51:01 -1000 |
| commit | 1bc48a502a43a4e42954ccd9e771af658e0e405f (patch) | |
| tree | ba547a93c98b882cf98f4550c49679d726b4bf3a /tools/perf/scripts/python/stackcollapse.py | |
| parent | 74eda6ea709e7effcd6678255fcaefad47d44695 (diff) | |
cgroup/cpuset: Make attach_ctx.old_cs track task group leader
There are two possible ways that migration of tasks from multiple source
cpusets to a target cpuset can happen. Either a multithread application
with threads in different cpusets is wholely migrated to a new cpuset
or disabling of v2 cpuset controller will move all the tasks in child
cpusets to the parent cpuset.
In the former case, it is the mm setting of the group leader that
really matters. So attach_ctx.old_cs should track the oldcs of the
thread leader. In the latter case, effective_mems of child cpusets
must always be a subset of the parent. So no real page migration
will not be necessary no matter which child cpuset is selected as
attach_ctx.old_cs.
IOW, attach_ctx.old_cs should be updated to match the latest task
group leader in cpuset_can_attach(), but fall back to that of the first
task if there is no group leader in the taskset.
Suggested-by: Ridong Chen <ridong.chen@linux.dev>
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Ridong Chen <ridong.chen@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
