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] [day] [month] [year] [list]
Date:	Tue, 1 Dec 2015 11:52:20 +0000
From:	Mel Gorman <mgorman@...e.de>
To:	Yaowei Bai <baiyaowei@...s.chinamobile.com>
Cc:	akpm@...ux-foundation.org, riel@...hat.com, mhocko@...e.cz,
	hannes@...xchg.org, kamezawa.hiroyu@...fujitsu.com, jslaby@...e.cz,
	Valdis.Kletnieks@...edu, zcalusic@...sync.net, vbabka@...e.cz,
	vdavydov@...allels.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: vmscan: Obey indeed proportional scanning for kswapd
 and memcg

On Mon, Nov 30, 2015 at 05:04:44PM +0800, Yaowei Bai wrote:
> On Wed, Nov 25, 2015 at 11:28:51AM +0000, Mel Gorman wrote:
> > On Wed, Nov 25, 2015 at 12:48:20PM +0800, Yaowei Bai wrote:
> > > Commit e82e0561dae9f3ae5 ("mm: vmscan: obey proportional scanning
> > > requirements for kswapd") intended to preserve the proportional scanning
> > > and reclaim what was requested by get_scan_count() for kswapd and memcg
> > > by stopping reclaiming one type(anon or file) LRU and reducing the other's
> > > amount of scanning proportional to the original scan target.
> > > 
> > > So the way to determine which LRU should be stopped reclaiming should be
> > > comparing scanned/unscanned percentages to the original scan target of two
> > > lru types instead of absolute values what implemented currently, because
> > > larger absolute value doesn't mean larger percentage, there shall be
> > > chance that larger absolute value with smaller percentage, for instance:
> > > 
> > > 	target_file = 1000
> > > 	target_anon = 500
> > > 	nr_file = 500
> > > 	nr_anon = 400
> > > 
> > > in this case, because nr_file > nr_anon, according to current implement,
> > > we will stop scanning anon lru and shrink file lru. This breaks
> > > proportional scanning intent and makes more unproportional.
> > > 
> > > This patch changes to compare percentage to the original scan target to
> > > determine which lru should be shrunk.
> > > 
> > > Signed-off-by: Yaowei Bai <baiyaowei@...s.chinamobile.com>
> > 
> > This one has gone back and forth a few times in the past. It really was
> 
> Sorry for reply late. Yes, I noticed Johannes Weiner has recommended this in
> the discussion thread about commit e82e0561dae9f3ae5 ("mm: vmscan: obey
> proportional scanning requirements for kswapd"):
> 
>  http://marc.info/?l=linux-kernel&m=136397130117394&w=2
> 
> and you thought it was out of scope of that series at that moment.
> But i didn't see this in the upstream git history.
> 

It was out of scope for the series at the time. The idea is still
interesting but it really needs to be quantified in some manner.

> > <SNIP>
> >
> > I see what your concern is, it's unclear what the actual impact is. Have
> > you done any testing to check if the proposed new behaviour is actually
> > better?
> 
> I didn't test this patch. Maybe it's difficult to catch this situation of
> the example case because mostly we scan LRUs evenly. but i think it's advantage
> is also obvious because it covers the case mentioned above to achieve indeed
> proportional without introducing extra overhead and makes the code match with
> the comments and more understandable to reduce people's confusion.
> 
> Did i miss something?
> 

It really needs to be tested and have some sort of supporting data
showing that it at least does no harm and ideally helps something
worthwhile.

-- 
Mel Gorman
SUSE Labs
--
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