lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add cgroup support for enabling controllers at boot time
On Fri, 7 Mar 2008, KAMEZAWA Hiroyuki wrote:

> > 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?
> > >
> >
> Hmm, cmdline like
>
> cgroup_disable=cpu,memory, ...
>
> should be written as
>
> cgroup_disable=cpu cgroup_disable=memory ....
>

Or just set the first space following cgroup_disable= to '\0' and you're
done. strcmp() will take care of the rest.


\
 
 \ /
  Last update: 2008-03-07 06:21    [W:0.048 / U:1.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site