OpenVZ Forum


Home » Mailing lists » Devel » Re: [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3)
Re: [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3) [message #19408] Fri, 20 July 2007 20:33 Go to next message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On 7/20/07, Balbir Singh <balbir@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.

Paul
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3) [message #19409 is a reply to message #19408] Fri, 20 July 2007 20:39 Go to previous message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On 7/20/07, Paul Menage <menage@google.com> wrote:
> On 7/20/07, Balbir Singh <balbir@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@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH 09/10] Task Containers(V11): Example CPU accounting subsystem
Next Topic: [PATCH 0/5][V2] Misc helper patches for pid namespaces
Goto Forum:
  


Current Time: Fri Aug 16 04:16:51 GMT 2024

Total time taken to generate the page: 0.02821 seconds