lkml.org 
[lkml]   [2010]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy
Paul Menage wrote:
> On Fri, Oct 22, 2010 at 1:09 AM, Li Zefan <lizf@cn.fujitsu.com> 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 could do with a bunch more comments, and
> maybe locking rules.
>
> Is there any chance of a lock inversion between dir->i_mutex and
> cgroup_lock in hierarchy_popuiate_dir() ?
>

The lock order is:

mutex_lock(&dir->i_mutex)
mutex_lock(&cgroup_mutex)
mutex_lock(&dir->i_mutex, I_MUTEX_CHILD)

it should be safe.


\
 
 \ /
  Last update: 2010-11-08 06:27    [W:0.126 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site