lkml.org 
[lkml]   [2011]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 09/11] mm: collect LRU list heads into struct lruvec
    On Mon 12-09-11 12:57:26, Johannes Weiner wrote:
    > Having a unified structure with a LRU list set for both global zones
    > and per-memcg zones allows to keep that code simple which deals with
    > LRU lists and does not care about the container itself.
    >
    > Once the per-memcg LRU lists directly link struct pages, the isolation
    > function and all other list manipulations are shared between the memcg
    > case and the global LRU case.
    >
    > Signed-off-by: Johannes Weiner <jweiner@redhat.com>

    Thanks for splitting this off the other patch. Much easier to review now.

    Reviewed-by: Michal Hocko <mhocko@suse.cz>

    Small nit bellow
    > ---
    > include/linux/mm_inline.h | 2 +-
    > include/linux/mmzone.h | 10 ++++++----
    > mm/memcontrol.c | 19 ++++++++-----------
    > mm/page_alloc.c | 2 +-
    > mm/swap.c | 11 +++++------
    > mm/vmscan.c | 12 ++++++------
    > 6 files changed, 27 insertions(+), 29 deletions(-)
    >
    [...]
    > diff --git a/mm/swap.c b/mm/swap.c
    > index 3a442f1..66e8292 100644
    > --- a/mm/swap.c
    > +++ b/mm/swap.c
    [...]
    > @@ -639,7 +639,6 @@ void lru_add_page_tail(struct zone* zone,
    > int active;
    > enum lru_list lru;
    > const int file = 0;
    > - struct list_head *head;
    >
    > VM_BUG_ON(!PageHead(page));
    > VM_BUG_ON(PageCompound(page_tail));
    > @@ -659,10 +658,10 @@ void lru_add_page_tail(struct zone* zone,
    > }
    > update_page_reclaim_stat(zone, page_tail, file, active);
    > if (likely(PageLRU(page)))
    > - head = page->lru.prev;
    > + __add_page_to_lru_list(zone, page_tail, lru,
    > + page->lru.prev);

    { } around multiline __add_page_to_lru_list?

    --
    Michal Hocko
    SUSE Labs
    SUSE LINUX s.r.o.
    Lihovarska 1060/12
    190 00 Praha 9
    Czech Republic


    \
     
     \ /
      Last update: 2011-09-21 15:45    [W:0.026 / U:30.824 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site