Re: [patch 8/8] mm: make per-memcg lru lists exclusive

Johannes Weiner
2011-06-02T14:24:31Z

On Thu, Jun 02, 2011 at 10:16:59PM +0900, Hiroyuki Kamezawa wrote:
> 2011/6/1 Johannes Weiner <hannes@cmpxchg.org>:
> > All lru list walkers have been converted to operate on per-memcg
> > lists, the global per-zone lists are no longer required.
> >
> > This patch makes the per-memcg lists exclusive and removes the global
> > lists from memcg-enabled kernels.
> >
> > The per-memcg lists now string up page descriptors directly, which
> > unifies/simplifies the list isolation code of page reclaim as well as
> > it saves a full double-linked list head for each page in the system.
> >
> > At the core of this change is the introduction of the lruvec
> > structure, an array of all lru list heads.  It exists for each zone
> > globally, and for each zone per memcg.  All lru list operations are
> > now done in generic code against lruvecs, with the memcg lru list
> > primitives only doing accounting and returning the proper lruvec for
> > the currently scanned memcg on isolation, or for the respective page
> > on putback.
> >
> > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
>
>
> could you divide this into
> - introduce lruvec
> - don't record section? information into pc->flags because we see
> "page" on memcg LRU
> and there is no requirement to get page from "pc".
> - remove pc->lru completely

Yes, that makes sense. It shall be fixed in the next version.