Skip to content

cpuset: implement sane hierarchy behaviors

Li Zefan cgroups containers lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 7 repliesIn review
  2. v210 patches 8 repliesSuperseded
  3. v110 patches 12 repliesSuperseded

Changes in v3 from the cover letter

- remove async hotplug propagation work
- do propagation work in one place for both hotplug and unplug

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7cpuset: let hotplug propagation work wait for task attachingkernel/cpuset.c+17 -120 replies
2/7cpuset: remove async hotplug propagation workkernel/cpuset.c+16 -531 reply
3/7cpuset: record old_mems_allowed in struct cpusetkernel/cpuset.c+36 -250 replies
4/7cpuset: introduce effective_{cpumask|nodemask}_cpuset()kernel/cpuset.c+65 -110 replies
5/7cpuset: allow to keep tasks in empty cpusetsinclude/linux/cgroup.h kernel/cpuset.c+114 -310 replies
6/7cpuset: allow to move tasks to empty cpusetsinclude/linux/cgroup.h kernel/cpuset.c+10 -20 replies
7/7cpuset: fix to migrate mm correctly in a corner casekernel/cpuset.c+11 -41 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/7] cpuset: implement sane hierarchy behaviors

v2 -> v3:

- remove async hotplug propagation work
- do propagation work in one place for both hotplug and unplug

v1 -> v2:

- add documentation in include/linux/cgroup.h
- drop rcu_read_lock() before calling update_task_nodemask() when iterating cpuset hierarchy

======================================

Currently some cpuset behaviors are not friendly when cpuset is co-mounted with other cgroup controllers.

Now with this patchset if cpuset is mounted with sane_behavior option, it behaves differently:

- Tasks will be kept in empty cpusets when hotplug happens and take masks of ancestors with non-empty cpus/mems, instead of being moved to an ancestor.

- A task can be moved into an empty cpuset, and again it takes masks of ancestors, so the user can drop a task into a newly created cgroup without having to do anything for it.

As tasks can reside in empy cpusets, here're some rules:

- They can be moved to another cpuset, regardless it's empty or not.

- Though it takes masks from ancestors, it takes other configs from the empty cpuset.

- If the ancestors' masks are changed, those tasks will also be updated to take new masks.

Li Zefan (7):
cpuset: let hotplug propagation work wait for task attaching
cpuset: remove async hotplug propagation work
cpuset: record old_mems_allowed in struct cpuset
cpuset: introduce effective_{cpumask|nodemask}_cpuset()
cpuset: allow to keep tasks in empty cpusets
cpuset: allow to move tasks to empty cpusets
cpuset: fix to migrate mm correctly in a corner case

 include/linux/cgroup.h |   7 +
 kernel/cpuset.c        | 390 ++++++++++++++++++++++++++++++++-----------------
 2 files changed, 264 insertions(+), 133 deletions(-)
Signature · 1 line
1.8.0.2