From: "Paul Menage" <menage@google.com>
To: "Daniel Hokka Zakrisson" <daniel@hozac.com>
Cc: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>,
containers@lists.osdl.org, LKML <linux-kernel@vger.kernel.org>,
"Li Zefan" <lizf@cn.fujitsu.com>
Subject: Re: [RFC][PATCH] introduce task cgroup (#task restrictioon for prevent fork bomb by cgroup)
Date: Sat, 7 Jun 2008 02:12:49 -0700 [thread overview]
Message-ID: <6599ad830806070212u13ea2c3fy931d37f2c9eab2a2@mail.gmail.com> (raw)
In-Reply-To: <41480.192.168.101.12.1212702756.squirrel@intranet>
On Thu, Jun 5, 2008 at 2:52 PM, Daniel Hokka Zakrisson <daniel@hozac.com> wrote:
> Would it make more sense to implement this as part of an rlimit subsystem,
> which also supports limiting e.g. address space, CPU time, number of open
> files, etc.? If we create one subsystem per resource, I'm afraid we're
> going to see quite some time spent in all those loops, and the options for
> cgroupfs is going to become pretty long if you want to exclude just one or
> two of the subsystems for one particular mount point.
>
In general, most of the cgroup loops that depend on the number of
available subsystems are control path (fork/exit/task move) rather
than data path.
If these loops ever did become an issue it wouldn't be hard to cache
which subsystems had callbacks of a given type, and thus make the loop
overheap be linear in the number of subsystems actually using a given
callback, rather than the number of registered subsystems. I've not
done this yet since it didn't seem worth the complexity, but if the
number of subsystems grows from what we have now it might be
worthwhile.
Having a single rlimit subsystem seems a bit inflexible, since it
would require anyone that wanted to track one resource to have to pay
the overhead of tracking all resources. By splitting into separate
subsystems, it would be possible to just pay the overhead for the
resource tracking that you actually care about.
You mention that you think it makes the set of mount arguments more
complex, but if you have middleware that can limit resource X, adding
X to the list of subsystems at the point when a cgroupfs is mounted
seems simple compared to the rest of the structure required to actual
set limits and monitor usage for X.
Paul
next prev parent reply other threads:[~2008-06-07 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 4:43 KOSAKI Motohiro
2008-06-05 5:13 ` KAMEZAWA Hiroyuki
2008-06-05 5:23 ` Daisuke Nishimura
2008-06-05 10:56 ` KOSAKI Motohiro
2008-06-05 5:47 ` Li Zefan
2008-06-05 10:53 ` KOSAKI Motohiro
2008-06-05 9:27 ` Dhaval Giani
2008-06-05 10:51 ` KOSAKI Motohiro
2008-06-05 21:52 ` Daniel Hokka Zakrisson
2008-06-07 7:41 ` KOSAKI Motohiro
2008-06-07 9:12 ` Paul Menage [this message]
2008-06-05 22:04 ` Paul Menage
2008-06-07 6:46 ` KOSAKI Motohiro
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=6599ad830806070212u13ea2c3fy931d37f2c9eab2a2@mail.gmail.com \
--to=menage@google.com \
--cc=containers@lists.osdl.org \
--cc=daniel@hozac.com \
--cc=kosaki.motohiro@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®