[PATCH 2/2] Make res_counter hierarchical

Daisuke Nishimura nishimura at mxp.nes.nec.co.jp
Tue Mar 11 02:03:20 PDT 2008


Hi.

> No. The mem_counter_N_limit is the limit for all the memory, that the
> Nth group consumes. This includes the RSS, page cache and swap for this
> group and all the child groups. Since RSS and page cache are accounted
> together, this limit tracks the sum of (memory + swap) values over the
> subtree started at the given group.
> 
It seems a bit confusing for me, because current memcg manages
only RSS and page cache, not swap.


>>>> IMO, a parent's usage is just sum of all childs'.
>>>> And, historically, memory overcommit is done agaist "memory usage + swap".
>>>>
>>>> How about this ?
>>>>  <mem_counter_top, swap_counter_top>
>>>> 	<mem_counter_sub, swap_counter_sub>
>>>> 	<mem_counter_sub, swap_counter_sub>
>>>> 	<mem_counter_sub, swap_counter_sub>
>>>>
>>>>    mem_counter_top.usage == sum of all mem_coutner_sub.usage
>>>>    swap_counter_sub.usage = sum of all swap_counter_sub.usage

I prefer Kamezawa-san's idea.


Thanks,
Daisuke Nishimura.


More information about the Containers mailing list