[lkml]   [2012]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch v2 3/6] memcg: rework mem_cgroup_iter to use cgroup iterators
On Wed 12-12-12 10:09:43, Ying Han wrote:
> But If i look at the callers of mem_cgroup_iter(), they all look like
> the following:
> memcg = mem_cgroup_iter(root, NULL, &reclaim);
> do {
> // do something
> memcg = mem_cgroup_iter(root, memcg, &reclaim);
> } while (memcg);
> So we get out of the loop when memcg returns as NULL, where the
> last_visited is cached as NULL as well thus no css_get(). That is what
> I meant by "each reclaim thread closes the loop".


> If that is true, the current implementation of mem_cgroup_iter_break()
> changes that.

I do not understand this though. Why should we touch the zone-iter
there? Just consider, if we did that then all the parallel targeted
reclaimers (! global case) would hammer the first node (root) as they
wouldn't continue where the last one finished.


Michal Hocko

 \ /
  Last update: 2012-12-12 20:01    [W:0.102 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site