lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Sep 2011 15:43:23 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	Johannes Weiner <jweiner@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Balbir Singh <bsingharora@...il.com>,
	Ying Han <yinghan@...gle.com>,
	Greg Thelen <gthelen@...gle.com>,
	Michel Lespinasse <walken@...gle.com>,
	Rik van Riel <riel@...hat.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [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@...hat.com>

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

Reviewed-by: Michal Hocko <mhocko@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ