On Fri 07-06-13 16:25:57, Tejun Heo wrote: > Hello, Michal. > > On Fri, Jun 07, 2013 at 09:37:54AM +0200, Michal Hocko wrote: > > > Oh yeah, it is racy. That's what I meant by "not having to be > > > completely strict". The race window is small enough and it's not like > > > we're messing up refcnt or may end up with use-after-free. > > > > But it would potentially pin (aka leak) the memcg for ever. > > It wouldn't be anything systemetic tho - race condition's likliness is > low and increases with the frequency of reclaim iteration, which at > the same time means that it's likely to remedy itself pretty soon. Sure a next visit on the same root subtree (same node, zone and prio) would css_put it but what if that root goes away itself. Still fixable, if every group checks its own cached iters and css_put everybody but that is even uglier. So doing the up-the-hierarchy cleanup in RCU callback is much easier. > I'm doubtful it'd matter. If it's still bothering, we sure can do it > from RCU callback. Yes, I would definitely prefer correctness over likeliness here. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html