Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-02 Thread Michal Hocko
On Tue 02-10-12 13:15:43, Glauber Costa wrote: > On 10/01/2012 09:00 PM, Michal Hocko wrote: > > On Tue 25-09-12 12:52:50, Glauber Costa wrote: > >> > For the root memcg, there is no need to rely on the res_counters. > > This is true only if there are no children groups but once there is at > >

Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-02 Thread Glauber Costa
On 10/01/2012 09:00 PM, Michal Hocko wrote: > On Tue 25-09-12 12:52:50, Glauber Costa wrote: >> > For the root memcg, there is no need to rely on the res_counters. > This is true only if there are no children groups but once there is at > least one we have to move global statistics into root

Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-02 Thread Glauber Costa
On 10/01/2012 09:00 PM, Michal Hocko wrote: On Tue 25-09-12 12:52:50, Glauber Costa wrote: For the root memcg, there is no need to rely on the res_counters. This is true only if there are no children groups but once there is at least one we have to move global statistics into root res_counter

Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-02 Thread Michal Hocko
On Tue 02-10-12 13:15:43, Glauber Costa wrote: On 10/01/2012 09:00 PM, Michal Hocko wrote: On Tue 25-09-12 12:52:50, Glauber Costa wrote: For the root memcg, there is no need to rely on the res_counters. This is true only if there are no children groups but once there is at least one we

Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-01 Thread Michal Hocko
On Tue 25-09-12 12:52:50, Glauber Costa wrote: > For the root memcg, there is no need to rely on the res_counters. This is true only if there are no children groups but once there is at least one we have to move global statistics into root res_counter and start using it since then. This is a

Re: [RFC 1/4] memcg: provide root figures from system totals

2012-10-01 Thread Michal Hocko
On Tue 25-09-12 12:52:50, Glauber Costa wrote: For the root memcg, there is no need to rely on the res_counters. This is true only if there are no children groups but once there is at least one we have to move global statistics into root res_counter and start using it since then. This is a

[RFC 1/4] memcg: provide root figures from system totals

2012-09-25 Thread Glauber Costa
For the root memcg, there is no need to rely on the res_counters. The sum of all mem cgroups plus the tasks in root itself, is necessarily the amount of memory used for the whole system. Since those figures are already kept somewhere anyway, we can just return them here, without too much hassle.

[RFC 1/4] memcg: provide root figures from system totals

2012-09-25 Thread Glauber Costa
For the root memcg, there is no need to rely on the res_counters. The sum of all mem cgroups plus the tasks in root itself, is necessarily the amount of memory used for the whole system. Since those figures are already kept somewhere anyway, we can just return them here, without too much hassle.