Skip to content

cgroup/cpuset: Task migration optimization

Waiman Long cgroups lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cgroup/cpuset: Use cpuset_rwsem read lock in cpuset_can_attach()kernel/cgroup/cpuset.c+22 -170 replies
2/2cgroup/cpuset: Make percpu cpuset_rwsem operation depending on DYNMODS statekernel/cgroup/cpuset.c+36 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cgroup/cpuset: Task migration optimization

It is found that workloads that generate a lot of task migrations among different cpusets are severely throttled because of the use of percpu rwsem in cpuset_rwsem. It is the same problem that led to commit 3942a9bd7b58 ("locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()") and commit 6a010a49b63a ("cgroup: Make !percpu threadgroup_rwsem operations optional").

The first patch in this series changes cpuset_can_attach() to use the read lock instead of the write lock. The second patch allows disabling of percpu reader fast path depending on the presence of CGRP_ROOT_FAVOR_DYNMODS flag in the cgroup root.

Waiman Long (2):
cgroup/cpuset: Use cpuset_rwsem read lock in cpuset_can_attach() cgroup/cpuset: Make percpu cpuset_rwsem operation depending on DYNMODS
state

 kernel/cgroup/cpuset.c | 75 ++++++++++++++++++++++++++++++++----------
 1 file changed, 58 insertions(+), 17 deletions(-)
Signature · 1 line
2.31.1