[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-11-07 Thread Li Zefan
Paul Menage wrote: > On Fri, Oct 22, 2010 at 1:09 AM, Li Zefan wrote: >> + /* >> +* Indicate if this subsystem can be bound/unbound to/from a cgroup >> +* hierarchy which has child cgroups. >> +*/ >> + unsigned int can_bind:1; > > Maybe call this "bindable"? >

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-28 Thread Paul Menage
On Fri, Oct 22, 2010 at 2:38 PM, Matt Helsley wrote: >> + * >> + * The iterating order is: a1, a2, b1, c1, c2, a3. So a parent will be >> + * processed before its children. >> + */ > > You could just say it's a depth-first walk except we process the parent before > its children. The standard term

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-28 Thread Paul Menage
On Fri, Oct 22, 2010 at 1:09 AM, Li Zefan wrote: > +       /* > +        * Indicate if this subsystem can be bound/unbound to/from a cgroup > +        * hierarchy which has child cgroups. > +        */ > +       unsigned int can_bind:1; Maybe call this "bindable"? Basic idea looks great, it coul

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-24 Thread Li Zefan
>> +/* >> + * cgroup_walk_herarchy - iterate through a cgroup hierarchy >> + * @process_cgroup: callback called on each cgroup in the hierarchy >> + * @data: will be passed to @process_cgroup >> + * @top_cgrp: the root cgroup of the hierarchy >> + * >> + * For such a hierarchy: >> + *a1

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-24 Thread Li Zefan
Peter Zijlstra wrote: > On Fri, 2010-10-22 at 16:09 +0800, Li Zefan wrote: >> For example, we can't decide a cgroup's cpuset.mems and >> cpuset.cpus automatically, so cpuset is not bindable. > > You mean to say that you cannot add cpuset to an existing hierarchy > right? Not that you cannot add p

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-22 Thread Matt Helsley
On Fri, Oct 22, 2010 at 04:09:56PM +0800, Li Zefan wrote: > Stephane posted a patchset to add perf_cgroup subsystem, so perf can > be used to monitor all threads belonging to a cgroup. > > But if you already mounted a cgroup hierarchy but without perf_cgroup > and the hierarchy has sub-cgroups, yo

[Devel] Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

2010-10-22 Thread Peter Zijlstra
On Fri, 2010-10-22 at 16:09 +0800, Li Zefan wrote: > For example, we can't decide a cgroup's cpuset.mems and > cpuset.cpus automatically, so cpuset is not bindable. You mean to say that you cannot add cpuset to an existing hierarchy right? Not that you cannot add perf/cpuacct to an existing cpuse