Re: [patch] mm: memcontrol: do not iterate uninitialized memcgs

2014-09-26 Thread Peter Zijlstra
On Thu, Sep 25, 2014 at 09:43:42AM -0400, Johannes Weiner wrote: > > > + if (next_css == &root->css || > > > + css_tryget_online(next_css)) { > > > + struct mem_cgroup *memcg; > > > + > > > + memcg = mem_cgroup_from_css(next_css); > > > +

Re: [patch] mm: memcontrol: do not iterate uninitialized memcgs

2014-09-25 Thread Michal Hocko
On Thu 25-09-14 09:43:42, Johannes Weiner wrote: [...] > From 1cd659f42f399adc58522d478f54587c8c4dd5cc Mon Sep 17 00:00:00 2001 > From: Johannes Weiner > Date: Wed, 24 Sep 2014 22:00:20 -0400 > Subject: [patch] mm: memcontrol: do not iterate uninitialized memcgs > > The cgro

Re: [patch] mm: memcontrol: do not iterate uninitialized memcgs

2014-09-25 Thread Johannes Weiner
() will become a problem in this path, it would be neat to annotate the state flag around which we synchronize like this, rather than have an anonymous barrier. Peter, would you know if this is correct, or whether these primitives actually do require a data dependency? Thanks! Updated patch: ---

Re: [patch] mm: memcontrol: do not iterate uninitialized memcgs

2014-09-24 Thread Tejun Heo
Hello, On Wed, Sep 24, 2014 at 10:31:18PM -0400, Johannes Weiner wrote: .. > not meet the ordering requirements for memcg, and so we still may see > partially initialized memcgs from the iterators. It's mainly the other way around - a fully initialized css may not show up in an iteration, but giv

[patch] mm: memcontrol: do not iterate uninitialized memcgs

2014-09-24 Thread Johannes Weiner
The cgroup iterators yield css objects that have not yet gone through css_online(), but they are not complete memcgs at this point and so the memcg iterators should not return them. d8ad30559715 ("mm/memcg: iteration skip memcgs not yet fully initialized") set out to implement exactly this, but it