From: Paul Menage <menage@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: lizf@cn.fujitsu.com, balbir@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
containers@lists.linux-foundation.org
Subject: Re: [PATCH 8/9] [RFC] Example multi-bindable subsystem: a per-cgroup notes field
Date: Thu, 2 Jul 2009 00:22:43 -0700 [thread overview]
Message-ID: <6599ad830907020022y106a2d8epf78d8ce67ebe7c9a@mail.gmail.com> (raw)
In-Reply-To: <6599ad830907011956i33769d5ek5401e93553d75c59@mail.gmail.com>
On Wed, Jul 1, 2009 at 7:56 PM, Paul Menage<menage@google.com> wrote:
>> Hmm, do we need to this "info" file as subsys ? How about making this as
>> default file set ? (if there are users.)
>>
>
> That would certainly be possible, and would be an alternative to
> having multi-bindable subsystem support.
>
> The advantage of adding multi-bindable subsystems is that you can
> avoid bloating the core cgroups code, by putting individual small
> cgroups features in their own code modules, and you get to decide at
> mount time which features are actually mounted; if they were part of
> the core cgroups files, then there would either need to be special
> mount options for each separate feature, or else no way to pick which
> features were mounted on each hierarchy.
BTW, just to give a balanced argument: I agree that these example
multi-bindable subsystems are somewhat weak justifications for the new
feature - they each supply a single control file, they're not
connected to anything in the kernel outside of the core cgroups
framework, and they're almost zero overhead if they're not actively
used, so making them part of the cgroups framework directly wouldn't
be totally unreasonable.
An example of a less-trivial multi-bindable subsystem could be cpuacct
- logically there's no reason that you couldn't track CPU usage in
multiple different hierarchies, keeping totals aggregated in different
ways for the groupings in different hierarchies, and the overhead
associated with tracking would mean that you wouldn't want to
automatically link cpuacct into every hierarchy. The practical problem
with this would be that finding the cgroup for a process would be
slower since there wouldn't be a 1:1 mapping from a task to a cpuacct
cgroup state object.
Instead each task would have multiple such states and to update the
usage accounting on each of them you'd have to do a list traversal
rather than a direct lookup (and worse, right now that list traversal
can only be done while holding cgroup_mutex, which is impossible when
doing cpuacct charging from the guts of the scheduler). I can see how
to extend the multi-bindable support to make it cheaper and to require
less synchronization (i.e. walking an RCU-safe array to find the
various state objects rather than doing a list traversal).
Although before doing that I guess it would be worth asking whether
anyone would actually *want* to aggregate CPU usage different ways for
different hierarchies, even if it makes logical sense to be able to do
so.
Paul
next prev parent reply other threads:[~2009-07-02 7:23 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 2:10 [PATCH 0/9] [RFC] CGroup Hierarchy Extensions Paul Menage
2009-07-02 2:10 ` [PATCH 1/9] [RFC] Support named cgroups hierarchies Paul Menage
2009-07-02 2:28 ` KAMEZAWA Hiroyuki
2009-07-02 2:49 ` Paul Menage
2009-07-03 1:51 ` Li Zefan
2009-07-02 8:09 ` Louis Rilling
2009-07-02 8:19 ` Paul Menage
2009-07-02 8:24 ` Louis Rilling
2009-07-03 2:32 ` Li Zefan
2009-07-13 23:39 ` Paul Menage
2009-07-02 2:11 ` [PATCH 2/9] [RFC]Move the cgroup debug subsys into cgroup.c to access internal state Paul Menage
2009-07-02 2:11 ` [PATCH 3/9] [RFC] Add a back-pointer from struct cg_cgroup_link to struct cgroup Paul Menage
2009-07-03 7:07 ` Li Zefan
2009-07-21 23:48 ` Paul Menage
2009-07-02 2:11 ` [PATCH 4/9] [RFC] Allow cgroup hierarchies to be created with no bound subsystems Paul Menage
2009-07-03 7:57 ` Li Zefan
2009-07-21 23:31 ` Paul Menage
2009-07-02 2:11 ` [PATCH 5/9] [RFC] Remove cgroup_subsys.root pointer Paul Menage
2009-07-02 9:04 ` Louis Rilling
2009-07-02 9:32 ` Paul Menage
2009-07-02 2:11 ` [PATCH 6/9] [RFC] Remove the cgroup_subsys.bind callback Paul Menage
2009-07-02 2:11 ` [PATCH 7/9] [RFC] Support multiply-bindable cgroup subsystems Paul Menage
2009-07-02 2:45 ` KAMEZAWA Hiroyuki
2009-07-02 2:52 ` Paul Menage
2009-07-02 3:16 ` KAMEZAWA Hiroyuki
2009-07-02 5:04 ` Paul Menage
2009-07-03 8:36 ` Li Zefan
2009-07-02 2:11 ` [PATCH 8/9] [RFC] Example multi-bindable subsystem: a per-cgroup notes field Paul Menage
2009-07-02 2:48 ` KAMEZAWA Hiroyuki
2009-07-02 2:56 ` Paul Menage
2009-07-02 3:17 ` KAMEZAWA Hiroyuki
2009-07-02 7:22 ` Paul Menage [this message]
2009-07-03 8:58 ` Li Zefan
2009-07-14 0:49 ` Paul Menage
2009-07-02 2:11 ` [PATCH 9/9] [RFC] Example multi-bindable subsystem: a max-depth controller Paul Menage
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=6599ad830907020022y106a2d8epf78d8ce67ebe7c9a@mail.gmail.com \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
/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
all inboxes | Powered by JetHome®