[Devel] Re: [PATCH v5 3/3] cgroups: make procs file writable

David Rientjes rientjes at google.com
Mon Dec 27 03:03:50 PST 2010


On Mon, 27 Dec 2010, Ben Blum wrote:

> > I think it would be appropriate to use a shared nodemask with file scope 
> > whenever you have cgroup_lock() to avoid the unnecessary kmalloc() even 
> > with GFP_KERNEL.  Cpusets are traditionally used on very large machines in 
> > the first place, so there is a higher likelihood that 
> > CONFIG_NODES_SHIFT > 8 whenever CONFIG_CPUSETS is enabled.
> > 
> > All users of NODEMASK_ALLOC() should be protected by cgroup_lock() other 
> > than cpuset_sprintf_memlist(), right?  That should be the only remaining 
> > user of NODEMASK_ALLOC() and works well since it can return -ENOMEM.
> 
> Just checked; that looks right. Perhaps I should add cgroup_is_locked()
> in cgroup.c and BUG_ON() checks for it in those functions, too?
> 

Sounds good, especially if it's coupled with a comment where the nodemasks 
are declared that specify that they are protected by the lock.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list