On 01/28/2013 02:54 PM, Jeff Liu wrote: > Root memcg with swap cgroup is special since we only do tracking but can > not set limits against it. In order to facilitate the implementation of > the coming swap cgroup structures delay allocation mechanism, we can bypass > the default swap statistics upon the root memcg and figure it out through > the global stats instead as below: > I am sorry if this is was already discussed before, but: > root_memcg_swap_stat: total_swap_pages - nr_swap_pages - used_swap_pages_of_all_memcgs > memcg_total_swap_stats: root_memcg_swap_stat + other_memcg_swap_stats > Shouldn't it *at least* be dependent on use_hierarchy? I don't see why root_memcg won't be always total_swap_pages - nr_swap_pages, since the root memcg is always viewed as a superset of the others, AFAIR. Even if it is not the general case (which again, I really believe it is), it certainly is the case for hierarchy enabled setups. Also, I truly don't understand what is the business of root_memcg_swap_stat in non-root memcgs. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>