Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-19 Thread Michal Hocko
This is an updated version of the patch. I have dropped .__DEPRECATED_clear_css_refs in this one as it makes the best sense to me. I didn't add Tejun's Reviewed-by because of this change. Could you recheck, please? --- >From 6c1f2e76e254e7638ad8cc87f319e3492ac80c5b Mon Sep 17 00:00:00 2001 From:

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-19 Thread Michal Hocko
This is an updated version of the patch. I have dropped .__DEPRECATED_clear_css_refs in this one as it makes the best sense to me. I didn't add Tejun's Reviewed-by because of this change. Could you recheck, please? --- From 6c1f2e76e254e7638ad8cc87f319e3492ac80c5b Mon Sep 17 00:00:00 2001 From:

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Tejun Heo
On Wed, Oct 17, 2012 at 03:30:47PM +0200, Michal Hocko wrote: > Now that pre_destroy callbacks are called from within cgroup_lock and > the cgroup has been checked to be empty without any children then there > is no other way to fail. > mem_cgroup_pre_destroy doesn't have to take a reference to

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Michal Hocko
On Thu 18-10-12 16:30:19, Li Zefan wrote: > > static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int > > event) > > @@ -5013,13 +5011,9 @@ free_out: > > static int mem_cgroup_pre_destroy(struct cgroup *cont) > > { > > struct mem_cgroup *memcg =

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Li Zefan
> static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int > event) > @@ -5013,13 +5011,9 @@ free_out: > static int mem_cgroup_pre_destroy(struct cgroup *cont) > { > struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); > - int ret; > > - css_get(>css); > -

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Li Zefan
static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event) @@ -5013,13 +5011,9 @@ free_out: static int mem_cgroup_pre_destroy(struct cgroup *cont) { struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); - int ret; - css_get(memcg-css); - ret

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Michal Hocko
On Thu 18-10-12 16:30:19, Li Zefan wrote: static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event) @@ -5013,13 +5011,9 @@ free_out: static int mem_cgroup_pre_destroy(struct cgroup *cont) { struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); - int

Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-18 Thread Tejun Heo
On Wed, Oct 17, 2012 at 03:30:47PM +0200, Michal Hocko wrote: Now that pre_destroy callbacks are called from within cgroup_lock and the cgroup has been checked to be empty without any children then there is no other way to fail. mem_cgroup_pre_destroy doesn't have to take a reference to

[PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-17 Thread Michal Hocko
Now that pre_destroy callbacks are called from within cgroup_lock and the cgroup has been checked to be empty without any children then there is no other way to fail. mem_cgroup_pre_destroy doesn't have to take a reference to memcg's css because all css' are marked dead already. Signed-off-by:

[PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

2012-10-17 Thread Michal Hocko
Now that pre_destroy callbacks are called from within cgroup_lock and the cgroup has been checked to be empty without any children then there is no other way to fail. mem_cgroup_pre_destroy doesn't have to take a reference to memcg's css because all css' are marked dead already. Signed-off-by: