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]
Message-ID: <alpine.LFD.2.00.0811170830320.3468@nehalem.linux-foundation.org>
Date:	Mon, 17 Nov 2008 08:37:56 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>,
	Gene Heskett <gene.heskett@...il.com>
Subject: Re: [PATCH] mm: evict streaming IO cache first



On Mon, 17 Nov 2008, Linus Torvalds wrote:
> On Mon, 17 Nov 2008, KAMEZAWA Hiroyuki wrote:
> > 
> > How about resetting zone->recent_scanned/rotated to be some value calculated from
> > INACTIVE_ANON/INACTIVE_FILE at some time (when the system is enough idle) ?
> 
> .. or how about just considering the act of adding a new page to the LRU 
> to be a "scan" event? IOW, "scanning" is not necessarily just an act of 
> the VM looking for pages to free, but would be a more general "activity" 
> meter.

Another thing strikes me: it looks like the logic in "get_scan_ratio()" 
has a tendency to get unbalanced - if we end up deciding that we should 
scan a lot of anonymous pages, the scan numbers for anonymous pages will 
go up, and we get even _more_ eager to scan those. Of course, "rotate" 
events will then make us less likely again, but for streaming loads, you 
wouldn't expect to see those at all.

There seems to be another bug there wrt the "aging" - we age anon page 
events and file page events independently, which sounds like it would make 
the math totally nonsensical. We do that whole

	anon / (anon + file)

thing, but since anon and file counts are aged independently, that "math" 
is not math, it looks like a totally random number that has no meaning.

So instead of having two independent aging things, if we age one side, we 
should age the other. No?

But maybe I'm looking at it wrong. It doesn't seem sensible to me, but 
maybe there's some deeper truth in there somewhere that I'm missing..

		Linus
--
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