Re: [patch 09/11] mm: collect LRU list heads into struct lruvec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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

Reviewed-by: Michal Hocko <mhocko@xxxxxxx>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]