Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Hugh Dickins
On Thu, 23 Jan 2014, Michal Hocko wrote: > On Thu 23-01-14 02:42:58, Hugh Dickins wrote: > > > > > > Actually both patches are needed. If we had only 2/2 then we wouldn't > > > endless loop inside mem_cgroup_iter but we could still return root to > > > caller all the time because

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Michal Hocko
On Thu 23-01-14 02:42:58, Hugh Dickins wrote: > On Wed, 22 Jan 2014, Michal Hocko wrote: > > On Tue 21-01-14 13:18:42, Hugh Dickins wrote: > > [...] > > > We do have a confusing situation. The hang goes back to 3.10 but takes > > > two different forms, because of intervening changes: in 3.10 and

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Hugh Dickins
On Wed, 22 Jan 2014, Michal Hocko wrote: > On Tue 21-01-14 13:18:42, Hugh Dickins wrote: > [...] > > We do have a confusing situation. The hang goes back to 3.10 but takes > > two different forms, because of intervening changes: in 3.10 and 3.11 > > mem_cgroup_iter repeatedly returns root memcg

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Hugh Dickins
On Wed, 22 Jan 2014, Michal Hocko wrote: On Tue 21-01-14 13:18:42, Hugh Dickins wrote: [...] We do have a confusing situation. The hang goes back to 3.10 but takes two different forms, because of intervening changes: in 3.10 and 3.11 mem_cgroup_iter repeatedly returns root memcg to its

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Michal Hocko
On Thu 23-01-14 02:42:58, Hugh Dickins wrote: On Wed, 22 Jan 2014, Michal Hocko wrote: On Tue 21-01-14 13:18:42, Hugh Dickins wrote: [...] We do have a confusing situation. The hang goes back to 3.10 but takes two different forms, because of intervening changes: in 3.10 and 3.11

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-23 Thread Hugh Dickins
On Thu, 23 Jan 2014, Michal Hocko wrote: On Thu 23-01-14 02:42:58, Hugh Dickins wrote: Actually both patches are needed. If we had only 2/2 then we wouldn't endless loop inside mem_cgroup_iter but we could still return root to caller all the time because mem_cgroup_iter_load would

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-22 Thread Michal Hocko
On Tue 21-01-14 13:18:42, Hugh Dickins wrote: [...] > We do have a confusing situation. The hang goes back to 3.10 but takes > two different forms, because of intervening changes: in 3.10 and 3.11 > mem_cgroup_iter repeatedly returns root memcg to its caller, in 3.12 and > 3.13 mem_cgroup_iter

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-22 Thread Michal Hocko
On Tue 21-01-14 11:42:19, Andrew Morton wrote: > On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko wrote: > > > 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized > > mem_cgroup_iter code in order to simplify it. A part of that change was > > dropping an optimization which didn't call

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-22 Thread Michal Hocko
On Tue 21-01-14 11:42:19, Andrew Morton wrote: On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko mho...@suse.cz wrote: 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized mem_cgroup_iter code in order to simplify it. A part of that change was dropping an optimization which didn't

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-22 Thread Michal Hocko
On Tue 21-01-14 13:18:42, Hugh Dickins wrote: [...] We do have a confusing situation. The hang goes back to 3.10 but takes two different forms, because of intervening changes: in 3.10 and 3.11 mem_cgroup_iter repeatedly returns root memcg to its caller, in 3.12 and 3.13 mem_cgroup_iter

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Hugh Dickins
On Tue, 21 Jan 2014, Andrew Morton wrote: > On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko wrote: > > > 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized > > mem_cgroup_iter code in order to simplify it. A part of that change was > > dropping an optimization which didn't call

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Andrew Morton
On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko wrote: > 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized > mem_cgroup_iter code in order to simplify it. A part of that change was > dropping an optimization which didn't call css_tryget on the root of > the walked tree. The patch

[PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Michal Hocko
19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized mem_cgroup_iter code in order to simplify it. A part of that change was dropping an optimization which didn't call css_tryget on the root of the walked tree. The patch however didn't change the css_put part in mem_cgroup_iter which

[PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Michal Hocko
19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized mem_cgroup_iter code in order to simplify it. A part of that change was dropping an optimization which didn't call css_tryget on the root of the walked tree. The patch however didn't change the css_put part in mem_cgroup_iter which

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Andrew Morton
On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko mho...@suse.cz wrote: 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized mem_cgroup_iter code in order to simplify it. A part of that change was dropping an optimization which didn't call css_tryget on the root of the walked tree.

Re: [PATCH -mm 2/2] memcg: fix css reference leak and endless loop in mem_cgroup_iter

2014-01-21 Thread Hugh Dickins
On Tue, 21 Jan 2014, Andrew Morton wrote: On Tue, 21 Jan 2014 11:45:43 +0100 Michal Hocko mho...@suse.cz wrote: 19f39402864e (memcg: simplify mem_cgroup_iter) has reorganized mem_cgroup_iter code in order to simplify it. A part of that change was dropping an optimization which didn't call