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:	Tue, 23 Nov 2010 12:35:35 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mel Gorman <mel@....ul.ie>
Cc:	Ben Gamari <bgamari@...il.com>,
	Minchan Kim <minchan.kim@...il.com>,
	linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Rik van Riel <riel@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Nick Piggin <npiggin@...nel.dk>
Subject: Re: [RFC 1/2] deactive invalidated pages

On Tue, 23 Nov 2010 14:58:56 +0000
Mel Gorman <mel@....ul.ie> wrote:

> On Tue, Nov 23, 2010 at 09:55:49AM -0500, Ben Gamari wrote:
> > On Tue, 23 Nov 2010 09:38:59 +0000, Mel Gorman <mel@....ul.ie> wrote:
> > > > If it's mapped pagecache then the user was being a bit silly (or didn't
> > > > know that some other process had mapped the file).  In which case we
> > > > need to decide what to do - leave the page alone, deactivate it, or
> > > > half-deactivate it as this patch does.
> > > > 
> > > 
> > > What are the odds of an fadvise() user having used mincore() in advance
> > > to determine if the page was in use by another process? I would guess
> > > "low" so this half-deactivate gives a chance for the page to be promoted
> > > again as well as a chance for the flusher threads to clean the page if
> > > it really is to be reclaimed.
> > > 
> > Do we really want to make the user jump through such hoops as using
> > mincore() just to get the kernel to handle use-once pages properly?
> 
> I would think "no" which is why I support half-deactivating pages so they won't
> have to.

If the page is page_mapped() then we can assume that some other process
is using it and we leave it alone *altogether*.

If the page is dirty or under writeback (and !page_mapped()) then we
should assume that we should free it asap.  The PageReclaim() trick
might help with that.

I just don't see any argument for moving the page to the head of the
inactive LRU as a matter of policy.  We can park it there because we
can't think of anythnig else to do with it, but it's the wrong place
for it.


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