From: David Rientjes <rientjes@google.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Pavel Emelianov <xemul@openvz.org>,
Hugh Dickins <hugh@veritas.com>,
Sudhir Kumar <skumar@linux.vnet.ibm.com>,
YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
taka@valinux.co.jp, linux-mm@kvack.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] Add cgroup support for enabling controllers at boot time
Date: Thu, 6 Mar 2008 21:14:26 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.1.00.0803062111560.26462@chino.kir.corp.google.com> (raw)
In-Reply-To: <47D0C76D.8050207@linux.vnet.ibm.com>
On Fri, 7 Mar 2008, Balbir Singh wrote:
> >> +static int __init cgroup_disable(char *str)
> >> +{
> >> + int i;
> >> + for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
> >> + struct cgroup_subsys *ss = subsys[i];
> >> + if (!strcmp(str, ss->name)) {
> >> + ss->disabled = 1;
> >> + break;
> >> + }
> >> + }
> >> +}
> >> +__setup("cgroup_disable=", cgroup_disable);
> >
> > This doesn't handle spaces very well, so isn't it possible for the name of
> > a current or future cgroup subsystem to be specified after cgroup_disable=
> > on the command line and have it disabled by accident?
> >
>
> How do you distinguish that from the user wanting to disable the controller on
> purpose? My understanding is that after parsing cgroup_disable=, the rest of the
> text is passed to cgroup_disable to process further. You'll find that all the
> __setup() code in the kernel is implemented this way.
>
Since the command line is logically delimited by spaces, you can
accidently disable a subsystem if its name appears in any of your kernel
options following your cgroup_disable= option. So if you're absolutely
confident that it wouldn't happen (for instance, if there's no logical
reason that a cgroup subsystem name should appear anywhere besides
cgroup_disable on the command line), then there's no objection.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-03-07 5:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 18:59 Balbir Singh
2008-03-06 19:00 ` [PATCH] Make memory resource control aware of boot options Balbir Singh
2008-03-06 19:10 ` [PATCH] Add cgroup support for enabling controllers at boot time David Rientjes
2008-03-07 4:41 ` Balbir Singh
2008-03-07 4:58 ` KAMEZAWA Hiroyuki
2008-03-07 5:15 ` David Rientjes
2008-03-07 5:14 ` David Rientjes [this message]
2008-03-07 8:40 ` Paul Menage
2008-03-07 8:56 ` David Rientjes
2008-03-07 9:01 ` Paul Menage
2008-03-06 19:11 ` Randy Dunlap
2008-03-07 0:05 ` Li Zefan
2008-03-07 4:37 ` Balbir Singh
2008-03-07 0:13 ` Li Zefan
2008-03-07 4:37 ` Balbir Singh
2008-03-07 4:56 ` Li Zefan
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=alpine.DEB.1.00.0803062111560.26462@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=hugh@veritas.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=skumar@linux.vnet.ibm.com \
--cc=taka@valinux.co.jp \
--cc=xemul@openvz.org \
--cc=yamamoto@valinux.co.jp \
/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