Re: [PATCH v2 2/7] memcg: split part of memcg creation to css_online
From: Michal Hocko <hidden>
Date: 2013-01-21 08:38:31
Also in:
linux-mm
From: Michal Hocko <hidden>
Date: 2013-01-21 08:38:31
Also in:
linux-mm
On Mon 21-01-13 11:33:20, Glauber Costa wrote:
On 01/18/2013 07:25 PM, Michal Hocko wrote:quoted
quoted
- spin_lock_init(&memcg->move_lock);quoted
+ memcg->swappiness = mem_cgroup_swappiness(parent);Please move this up to oom_kill_disable and use_hierarchy initialization.One thing: wouldn't moving it to inside use_hierarchy be a change of behavior here?
I do not see how it would change the behavior. But maybe I wasn't clear enough. I just wanted to make all three: memcg->use_hierarchy = parent->use_hierarchy; memcg->oom_kill_disable = parent->oom_kill_disable; memcg->swappiness = mem_cgroup_swappiness(parent); in the same visual block so that we can split the function into three parts. Inherited values which don't depend on use_hierarchy, those that depend on use_hierarchy and the rest that depends on the previous decisions (kmem e.g.). Makes sense? -- Michal Hocko SUSE Labs