From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: David Rientjes <rientjes@google.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: Fri, 07 Mar 2008 10:11:17 +0530 [thread overview]
Message-ID: <47D0C76D.8050207@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0803061108370.13110@chino.kir.corp.google.com>
David Rientjes wrote:
> On Fri, 7 Mar 2008, Balbir Singh wrote:
>
>> @@ -3010,3 +3020,16 @@ static void cgroup_release_agent(struct
>> spin_unlock(&release_list_lock);
>> mutex_unlock(&cgroup_mutex);
>> }
>> +
>> +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.
>> diff -puN Documentation/kernel-parameters.txt~cgroup_disable Documentation/kernel-parameters.txt
>> --- linux-2.6.25-rc4/Documentation/kernel-parameters.txt~cgroup_disable 2008-03-06 17:57:32.000000000 +0530
>> +++ linux-2.6.25-rc4-balbir/Documentation/kernel-parameters.txt 2008-03-06 18:00:32.000000000 +0530
>> @@ -383,6 +383,10 @@ and is between 256 and 4096 characters.
>> ccw_timeout_log [S390]
>> See Documentation/s390/CommonIO for details.
>>
>> + cgroup_disable= [KNL] Enable disable a particular controller
>> + Format: {name of the controller}
>> + See /proc/cgroups for a list of compiled controllers
>> +
>
> This works on multiple controllers, though, if they follow
> cgroup_disable=, so the documentation and format should reflect that.
Absolutely! done.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
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 4:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 18:59 [PATCH] Add cgroup support for enabling controllers at boot time 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 [this message]
2008-03-07 4:58 ` KAMEZAWA Hiroyuki
2008-03-07 5:15 ` David Rientjes
2008-03-07 5:14 ` David Rientjes
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=47D0C76D.8050207@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--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=rientjes@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;
as well as URLs for NNTP newsgroup(s).