linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/17] cgroup: Major changes to cgroup v2 core
@ 2017-05-15 13:33 Waiman Long
  2017-05-15 13:34 ` [RFC PATCH v2 01/17] cgroup: reorganize cgroup.procs / task write path Waiman Long
                   ` (16 more replies)
  0 siblings, 17 replies; 69+ messages in thread
From: Waiman Long @ 2017-05-15 13:33 UTC (permalink / raw)
  To: Tejun Heo, Li Zefan, Johannes Weiner, Peter Zijlstra, Ingo Molnar
  Cc: cgroups, linux-kernel, linux-doc, linux-mm, kernel-team, pjt,
	luto, efault, longman

 v1->v2:
  - Add a new pass-through mode to allow each controller its own
    unique virtual hierarchy.
  - Add a new control file "cgroup.resource_control" to enable
    the user creation of separate control knobs for internal process
    anywhere in the v2 hierarchy instead of doing that automatically
    in the thread root only.
  - More functionality in the debug controller to dump out more
    internal states.
  - Ported to the 4.12 kernel.
  - Other miscellaneous bug fixes.

 v1: https://lwn.net/Articles/720651/

The existing cgroup v2 core has quite a number of limitations and
constraints that make it hard to migrate controllers from v1 to v2
without suffering performance loss and usability.

This patchset makes some major changes to the cgroup v2 core to
give more freedom and flexibility to controllers so that they can
have their own unique views of the virtual process hierarchies that
are best suit for thier own use cases without suffering unneeded
performance problem. So "Live Free or Die".

On the other hand, the existing controller activation mechanism via
the cgroup.subtree_control file remains unchanged. So existing code 
that relies on the current cgroup v2 semantics should not be impacted.

The major changes are:
 1) Getting rid of the no internal process constraint by allowing
    controllers that don't like internal process competition to have
    separate sets of control knobs for internal processes as if they
    are in a child cgroup of their own.
 2) A thread mode for threaded controllers (e.g. cpu) that can
    have unthreaded child cgroups under a thread root.
 3) A pass-through mode for controllers that disable them for a cgroup
    effectively collapsing the cgroup's processes to its parent
    from the perspective of those controllers while allowing child
    cgroups to have the controllers enabled again. This allows each
    controller a unique virtual hierarchy that can be quite different
    from other controllers.

This patchset incorporates the following 2 patchsets from Tejun Heo:

 1) cgroup v2 thread mode patchset (Patches 1-5)
    https://lkml.org/lkml/2017/2/2/592
 2) CPU Controller on Control Group v2 (Patches 15 & 16)
    https://lkml.org/lkml/2016/8/5/368

Patch 6 fixes a task_struct reference counting bug introduced in
patch 1.

Patch 7 fixes a problem that css_kill() may be called more than once.

Patch 8 moves the debug cgroup out from cgroup_v1.c into its own
file.

Patch 9 keeps more accurate counts of the number of tasks associated
with each css_set.

Patch 10 enhances the debug controller to provide more information
relevant to the cgroup v2 thread mode to ease debugging effort.

Patch 11 implements the enhanced cgroup v2 thread mode with the
following enhancements:

 1) Thread roots are treated differently from threaded cgroups.
 2) Thread root can now have non-threaded controllers enabled as well
    as non-threaded children.

Patch 12 gets rid of the no internal process contraint.

Patch 13 enables fine grained control of controllers including a new
pass-through mode.

Patch 14 enhances the debug controller to print out the virtual
hierarchies for each controller in cgroup v2.

Patch 17 makes both cpu and cpuacct controllers threaded.

Tejun Heo (7):
  cgroup: reorganize cgroup.procs / task write path
  cgroup: add @flags to css_task_iter_start() and implement
    CSS_TASK_ITER_PROCS
  cgroup: introduce cgroup->proc_cgrp and threaded css_set handling
  cgroup: implement CSS_TASK_ITER_THREADED
  cgroup: implement cgroup v2 thread support
  sched: Misc preps for cgroup unified hierarchy interface
  sched: Implement interface for cgroup unified hierarchy

Waiman Long (10):
  cgroup: Fix reference counting bug in cgroup_procs_write()
  cgroup: Prevent kill_css() from being called more than once
  cgroup: Move debug cgroup to its own file
  cgroup: Keep accurate count of tasks in each css_set
  cgroup: Make debug cgroup support v2 and thread mode
  cgroup: Implement new thread mode semantics
  cgroup: Remove cgroup v2 no internal process constraint
  cgroup: Allow fine-grained controllers control in cgroup v2
  cgroup: Enable printing of v2 controllers' cgroup hierarchy
  sched: Make cpu/cpuacct threaded controllers

 Documentation/cgroup-v2.txt     |  287 +++++++--
 include/linux/cgroup-defs.h     |   68 ++
 include/linux/cgroup.h          |   12 +-
 kernel/cgroup/Makefile          |    1 +
 kernel/cgroup/cgroup-internal.h |   19 +-
 kernel/cgroup/cgroup-v1.c       |  220 ++-----
 kernel/cgroup/cgroup.c          | 1317 ++++++++++++++++++++++++++++++++-------
 kernel/cgroup/cpuset.c          |    6 +-
 kernel/cgroup/debug.c           |  471 ++++++++++++++
 kernel/cgroup/freezer.c         |    6 +-
 kernel/cgroup/pids.c            |    1 +
 kernel/events/core.c            |    1 +
 kernel/sched/core.c             |  150 ++++-
 kernel/sched/cpuacct.c          |   55 +-
 kernel/sched/cpuacct.h          |    5 +
 mm/memcontrol.c                 |    2 +-
 net/core/netclassid_cgroup.c    |    2 +-
 17 files changed, 2148 insertions(+), 475 deletions(-)
 create mode 100644 kernel/cgroup/debug.c

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2017-06-03 10:33 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 13:33 [RFC PATCH v2 00/17] cgroup: Major changes to cgroup v2 core Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 01/17] cgroup: reorganize cgroup.procs / task write path Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 02/17] cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 03/17] cgroup: introduce cgroup->proc_cgrp and threaded css_set handling Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 04/17] cgroup: implement CSS_TASK_ITER_THREADED Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 05/17] cgroup: implement cgroup v2 thread support Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 06/17] cgroup: Fix reference counting bug in cgroup_procs_write() Waiman Long
2017-05-17 19:20   ` Tejun Heo
2017-05-15 13:34 ` [RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once Waiman Long
2017-05-17 19:23   ` Tejun Heo
2017-05-17 20:24     ` Waiman Long
2017-05-17 21:34       ` Tejun Heo
2017-05-15 13:34 ` [RFC PATCH v2 08/17] cgroup: Move debug cgroup to its own file Waiman Long
2017-05-17 21:36   ` Tejun Heo
2017-05-18 15:29     ` Waiman Long
2017-05-18 15:52     ` Waiman Long
2017-05-19 19:21       ` Tejun Heo
2017-05-19 19:33         ` Waiman Long
2017-05-19 20:28           ` Tejun Heo
2017-05-15 13:34 ` [RFC PATCH v2 09/17] cgroup: Keep accurate count of tasks in each css_set Waiman Long
2017-05-17 21:40   ` Tejun Heo
2017-05-18 15:56     ` Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 10/17] cgroup: Make debug cgroup support v2 and thread mode Waiman Long
2017-05-17 21:43   ` Tejun Heo
2017-05-18 15:58     ` Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 11/17] cgroup: Implement new thread mode semantics Waiman Long
2017-05-17 21:47   ` Tejun Heo
2017-05-18 17:21     ` Waiman Long
2017-05-19 20:26   ` Tejun Heo
2017-05-19 20:58     ` Tejun Heo
2017-05-22 17:13     ` Waiman Long
2017-05-22 17:32       ` Waiman Long
2017-05-24 20:36       ` Tejun Heo
2017-05-24 21:17         ` Waiman Long
2017-05-24 21:27           ` Tejun Heo
2017-06-01 14:50             ` Tejun Heo
2017-06-01 15:10               ` Peter Zijlstra
2017-06-01 15:35                 ` Tejun Heo
2017-06-01 18:44                 ` Waiman Long
2017-06-01 18:47                   ` Tejun Heo
2017-06-01 19:27                     ` Waiman Long
2017-06-01 20:38                       ` Tejun Heo
2017-06-01 20:48                         ` Waiman Long
2017-06-01 20:52                           ` Tejun Heo
2017-06-01 21:12                             ` Waiman Long
2017-06-01 21:18                               ` Tejun Heo
2017-06-02 20:36                                 ` Waiman Long
2017-06-03 10:33                                   ` Tejun Heo
2017-06-01 19:55                   ` Waiman Long
2017-06-01 20:15                 ` Waiman Long
2017-06-01 18:41               ` Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 12/17] cgroup: Remove cgroup v2 no internal process constraint Waiman Long
2017-05-19 20:38   ` Tejun Heo
2017-05-20  2:10     ` Mike Galbraith
2017-05-24 17:01       ` Tejun Heo
2017-05-22 16:56     ` Waiman Long
2017-05-24 17:05       ` Tejun Heo
2017-05-24 18:19         ` Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 13/17] cgroup: Allow fine-grained controllers control in cgroup v2 Waiman Long
2017-05-19 20:55   ` Tejun Heo
2017-05-19 21:20     ` Waiman Long
2017-05-24 17:31       ` Tejun Heo
2017-05-24 17:49         ` Waiman Long
2017-05-24 17:56           ` Tejun Heo
2017-05-24 18:17             ` Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 14/17] cgroup: Enable printing of v2 controllers' cgroup hierarchy Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 15/17] sched: Misc preps for cgroup unified hierarchy interface Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 16/17] sched: Implement interface for cgroup unified hierarchy Waiman Long
2017-05-15 13:34 ` [RFC PATCH v2 17/17] sched: Make cpu/cpuacct threaded controllers Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).