[Devel] Re: [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3)
Paul Menage
menage at google.com
Fri Jul 20 13:39:58 PDT 2007
On 7/20/07, Paul Menage <menage at google.com> wrote:
> On 7/20/07, Balbir Singh <balbir at linux.vnet.ibm.com> wrote:
> > + mem = mem_container_from_cont(task_container(p,
> > + mem_container_subsys_id));
> > + css_get(&mem->css);
>
> The container framework won't try to free a subsystem's root container
> state, so this isn't needed.
Sorry, this was a reply to the wrong patch hunk.
The css_get() in mem_container_create() is the unnecessary one.
Also, rather than doing something like:
mem_container_from_cont(task_container(p, mem_container_subsys_id))
you'd be better off defining a similar wrapper to
mem_container_from_cont() called mem_container_from_task() that uses
task_subsys_state() rather than container_subsys_state() - you'll save
a few indirections.
Paul
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list