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-next>] [day] [month] [year] [list]
Message-ID: <20110811210914.GB31229@cmpxchg.org>
Date:	Thu, 11 Aug 2011 23:09:14 +0200
From:	Johannes Weiner <hannes@...xchg.org>
To:	Ying Han <yinghan@...gle.com>
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Michal Hocko <mhocko@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Minchan Kim <minchan.kim@...il.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Mel Gorman <mgorman@...e.de>, Greg Thelen <gthelen@...gle.com>,
	Michel Lespinasse <walken@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 2/8] mm: memcg-aware global reclaim

On Thu, Aug 11, 2011 at 01:39:45PM -0700, Ying Han wrote:
> Please consider including the following patch for the next post. It causes
> crash on some of the tests where sc->mem_cgroup is NULL (global kswapd).
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index b72a844..12ab25d 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2768,7 +2768,8 @@ loop_again:
>                          * Do some background aging of the anon list, to
> give
>                          * pages a chance to be referenced before
> reclaiming.
>                          */
> -                       if (inactive_anon_is_low(zone, &sc))
> +                       if (scanning_global_lru(&sc) &&
> +                                       inactive_anon_is_low(zone, &sc))
>                                 shrink_active_list(SWAP_CLUSTER_MAX, zone,
>                                                         &sc, priority, 0);

Thanks!  I completely overlooked this one and only noticed it after
changing the arguments to shrink_active_list().

On memcg configurations, scanning_global_lru() will essentially never
be true again, so I moved the anon pre-aging to a separate function
that also does a hierarchy loop to preage the per-memcg anon lists.

I hope to send out the next revision soon.
--
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