From: Waiman Long <longman@redhat.com>
To: Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Roman Gushchin <guro@fb.com>,
Jens Axboe <axboe@kernel.dk>,
Andrew Morton <akpm@linux-foundation.org>,
Dennis Zhou <dennis@kernel.org>,
Shakeel Butt <shakeelb@google.com>,
Waiman Long <longman@redhat.com>
Subject: [PATCH v4 0/5] cgroup: Introducing bypass mode
Date: Tue, 20 Nov 2018 12:51:24 -0500 [thread overview]
Message-ID: <1542736289-31338-1-git-send-email-longman@redhat.com> (raw)
v4:
- Rebased to the latest for-4.21 branch of cgroup tree.
- Make each controller explicitly opt in to become bypassable by
setting the bypassable cgroup_subsys flag. Currently, only cpu
controller is made bypassable.
- Break out the cgroup_v2.rst documentation update as separate patch.
v3:
- Remove invalid cgroup subdirectory creation patch.
- Add use cases for the bypass mode and removing statements about
control files ownership in cgroup-v2.txt.
- Restrict bypass mode to non-domain (threaded) controllers only.
v3 patch - https://lkml.org/lkml/2017/8/9/604
This patchset introduces a new bypass mode to the cgroup v2 core to
give more freedom and flexibility to controllers which choose to become
bypassable the freedom to shape their own unique views of the virtual
cgroup hierarchies that can best suit thier own use cases.
Because of the inherent performance overhead in enabling cpu controller,
it is made bypassable so that the controller only needs to be enabled
at those cgroups that really need it instead of in every cgroups at a
given layer if at least one of them needs it.
The cpu controller performance problem is one of the major issues
in migrating from cgroup v1 to v2.
For example,
R - A(+) - B(#) - C(+)
\ D(#)
where "+" means the controller is enabled and "#" means the controller
is bypassed. For this controller's perspective, the cgroups are
equivalent to:
R - A|B|D - C
Underneath the root R, cgoups A, B and D are controlled by one set of
knobs and cgroup C is controlled by another set of knobs as a child of
cgroups A|B|C.
This patchset is layered on top of the "for-4.21" branch of Tejun's
cgroup git tree.
Patch 1 introduces a new bypass mode that allows a bypassable
controller to be disabled in a cgroup, but to be re-enabled again in its
children. This is enabled by writing the controller name prefixed with
'#' to the "cgroup.subtree_control" file. Then all its children will
have this controller in bypass mode.
Patch 2 extends the bypass mode mechanism to allow those child cgroups
that are put into the bypass mode for a particular bypassable controller
by their parent to be re-enabled again by writing the controller name
with the '+' prefix to the "cgroup.controllers" file.
Patch 3 extends the debug controller to expose additional controller
masks introduced by this patchset.
Patch 4 makes the cpu controller bypassable.
Patch 5 documents the new bypass mode in cgroup-v2.rst file.
Waiman Long (5):
cgroup: subtree_control bypass mode for bypassable controllers
cgroup: Allow reenabling of controller in bypass mode
cgroup: Make debug controller report new controller masks
sched/core: Make cpu cgroup controller bypassable
cgroup: Document bypass mode
Documentation/admin-guide/cgroup-v2.rst | 66 +++++---
include/linux/cgroup-defs.h | 26 +++-
kernel/cgroup/cgroup.c | 256 +++++++++++++++++++++++++-------
kernel/cgroup/debug.c | 2 +
kernel/sched/core.c | 1 +
5 files changed, 276 insertions(+), 75 deletions(-)
--
1.8.3.1
next reply other threads:[~2018-11-20 17:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 17:51 Waiman Long [this message]
2018-11-20 17:51 ` [PATCH v4 1/5] cgroup: subtree_control bypass mode for bypassable controllers Waiman Long
2018-11-29 11:18 ` Dan Carpenter
2018-12-10 19:56 ` Waiman Long
2018-11-20 17:51 ` [PATCH v4 2/5] cgroup: Allow reenabling of controller in bypass mode Waiman Long
2018-11-20 17:51 ` [PATCH v4 3/5] cgroup: Make debug controller report new controller masks Waiman Long
2018-11-20 17:51 ` [PATCH v4 4/5] sched/core: Make cpu cgroup controller bypassable Waiman Long
2018-11-20 17:51 ` [PATCH v4 5/5] cgroup: Document bypass mode Waiman Long
2018-11-21 14:27 ` [PATCH v4 0/5] cgroup: Introducing " Michael Kerrisk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1542736289-31338-1-git-send-email-longman@redhat.com \
--to=longman@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=dennis@kernel.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).