From: Tejun Heo <tj@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: Li Zefan <lizefan@huawei.com>,
hannes@cmpxchg.org, peterz@infradead.org, mingo@redhat.com,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com, pjt@google.com, luto@amacapital.net,
efault@gmx.de, torvalds@linux-foundation.org
Subject: Re: [PATCH 07/10] cgroup: implement cgroup v2 thread support
Date: Tue, 13 Jun 2017 10:06:22 -0400 [thread overview]
Message-ID: <20170613140622.GC28327@htj.duckdns.org> (raw)
In-Reply-To: <6351a07a-7e88-4c89-7d62-cb71021cf580@redhat.com>
Hello, Waiman.
On Mon, Jun 12, 2017 at 11:41:09AM -0400, Waiman Long wrote:
> > Internally, in a threaded subtree, each css_set has its ->proc_cset
> > pointing to a matching css_set which belongs to the thread root. This
> > ensures that thread root level cgroup_subsys_state for all threaded
> > controllers are readily accessible for domain-level operations.
>
> As far as I understand, the proc_cset thing is just for cgroup.procs
> iteration purpose. They are not used for accessing cgroup_subsys_state
> for domain-level operation. In fact, all the relevant CSSes will be
> available in the local css_set and there is no need to look elsewhere.
Because none is implementing domain resource accounting. Once we
start doing that, we'll have to charge them against domain csses not
the thread ones.
> > +/* if threaded, would @cgrp become root of a mixed threaded subtree? */
> > +static bool cgroup_is_mixable(struct cgroup *cgrp)
> > +{
> > + /*
> > + * Root isn't under domain level resource control exempting it from
> > + * the no-internal-process constraint, so it can serve as a thread
> > + * root and a parent of resource domains at the same time.
> > + */
> > + return !cgroup_parent(cgrp);
> > +}
>
> Eventually, I would like to see a container root to be regarded as
> mixable so that it will look and feel like a real root to the container.
> Yes, that will mean having to deal with internal process competition
> with resource domain controllers. If we are going to keep the no
> internal process constraint, this is the other exception that I would
> like to have. We can work around that by having, for example, special
> directory for resource domain controllers to manage their resources like
> what I have proposed in the resource domain patch. Or we can just let
> those resource domain controllers to deal with it.
Yeah, the code and semantics are structured for future expansion.
That said, such expansion has to mean something inherently useful. Up
until now, all that have been suggested are either cosmetic or not
clearly defined and IMHO do more to obscure what's going on rather
than enable anything fundamental. What we do with the interface
should follow the function. If we can come up with a way to lift the
restriction on an internal node which enables some fundamental
capabilities in a clearly defined manner, let's of course do that, but
we shouldn't do that just because we feel like to.
Thanks.
--
tejun
next prev parent reply other threads:[~2017-06-13 14:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 14:03 [PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v2 Tejun Heo
2017-06-10 14:03 ` [PATCH 01/10] cgroup: separate out cgroup_has_tasks() Tejun Heo
2017-06-10 14:03 ` [PATCH 02/10] cgroup: reorganize cgroup.procs / task write path Tejun Heo
2017-06-10 14:03 ` [PATCH 03/10] cgroup: Fix reference counting bug in cgroup_procs_write() Tejun Heo
2017-06-10 14:03 ` [PATCH 04/10] cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS Tejun Heo
2017-06-10 14:03 ` [PATCH 05/10] cgroup: introduce cgroup->proc_cgrp and threaded css_set handling Tejun Heo
2017-06-10 14:03 ` [PATCH 08/10] sched: Misc preps for cgroup unified hierarchy interface Tejun Heo
2017-06-10 14:03 ` [PATCH 09/10] sched: Implement interface for cgroup unified hierarchy Tejun Heo
[not found] ` <20170610140351.10703-1-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-10 14:03 ` [PATCH 06/10] cgroup: implement CSS_TASK_ITER_THREADED Tejun Heo
2017-06-10 14:03 ` [PATCH 07/10] cgroup: implement cgroup v2 thread support Tejun Heo
[not found] ` <20170610140351.10703-8-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-12 15:41 ` Waiman Long
2017-06-13 14:06 ` Tejun Heo [this message]
2017-06-15 20:14 ` [PATCH v3 " Tejun Heo
2017-06-10 14:03 ` [PATCH 10/10] sched: Make cpu/cpuacct threaded controllers Tejun Heo
2017-06-12 12:31 ` [PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v2 Peter Zijlstra
[not found] ` <20170612123150.scopfxela7v26dct-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-06-12 21:27 ` Tejun Heo
[not found] ` <20170612212753.GN19206-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2017-06-15 20:16 ` Tejun Heo
2017-06-27 7:01 ` Peter Zijlstra
2017-06-30 13:23 ` Tejun Heo
2017-07-10 8:32 ` Peter Zijlstra
[not found] ` <20170710083200.poevcjo7x47hy5ni-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-07-10 21:01 ` Waiman Long
[not found] ` <8f9c83d7-cadf-3a41-8e56-5828d5abfa26-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-11 12:15 ` Peter Zijlstra
[not found] ` <20170711121527.imshmmoe4cj7dkig-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-07-11 14:14 ` Waiman Long
[not found] ` <a554d16c-af40-756e-a611-a453451c40a9-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-11 16:52 ` Peter Zijlstra
[not found] ` <20170711165233.xx6wko4pdxk4rb72-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-07-11 21:12 ` Waiman Long
[not found] ` <0659619a-067d-b542-918c-e468c51feb23-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-12 7:45 ` Peter Zijlstra
[not found] ` <20170712074555.slefkebvdpfjse34-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-07-12 14:00 ` Waiman Long
2017-06-15 20:17 ` [PATCH] cgroup: update debug controller to print out thread mode information Tejun Heo
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=20170613140622.GC28327@htj.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=efault@gmx.de \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=longman@redhat.com \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=torvalds@linux-foundation.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).