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:	Thu, 26 Jan 2012 21:11:21 -0800 (PST)
From:	Dan Magenheimer <dan.magenheimer@...cle.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Hansen <dave@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Konrad Wilk <konrad.wilk@...cle.com>,
	Seth Jennings <sjenning@...ux.vnet.ibm.com>,
	Nitin Gupta <ngupta@...are.org>,
	Nebojsa Trpkovic <trx.lists@...il.com>, minchan@...nel.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Chris Mason <chris.mason@...cle.com>
Subject: RE: [PATCH] mm: implement WasActive page flag (for improving
 cleancache)

> From: Rik van Riel [mailto:riel@...hat.com]
> Subject: Re: [PATCH] mm: implement WasActive page flag (for improving cleancache)
> 
> On 01/26/2012 07:56 PM, Dan Magenheimer wrote:
> 
> > The patch resolves issues reported with cleancache which occur
> > especially during streaming workloads on older processors,
> > see https://lkml.org/lkml/2011/8/17/351
> >
> > I can see that may not be sufficient, so let me expand on it.
> >
> > First, just as page replacement worked prior to the active/inactive
> > redesign at 2.6.27, cleancache works without the WasActive page flag.
> > However, just as pre-2.6.27 page replacement had problems on
> > streaming workloads, so does cleancache.  The WasActive page flag
> > is an attempt to pass the same active/inactive info gathered by
> > the post-2.6.27 kernel into cleancache, with the same objectives and
> > presumably the same result: improving the "quality" of pages preserved
> > in memory thus reducing refaults.
> >
> > Is that clearer?  If so, I'll do better on the description at v2.
> 
> Whether or not this patch improves things would depend
> entirely on the workload, no?
> 
> I can imagine a workload where we have a small virtual
> machine and a large cleancache buffer in the host.
> 
> Due to the small size of the virtual machine, pages
> might not stay on the inactive list long enough to get
> accessed twice in a row.
> 
> This is almost the opposite problem (and solution) of
> what you ran into.
> 
> Both seem equally likely (and probable)...

Hi Rik --

Thanks for the reply!

Yes, that's right, in your example, the advantage of
cleancache would be lost.  But the cost would also be
nil because the cleancache backend (zcache) would be rejecting
the inactive pages so would never incur any compression
cost and never use any space.  So "first, do no harm"
is held true.

To get the best of both (like the post-2.6.27 kernel page
replacement algorithm), the cleancache backend could implement
some kind of active/inactive balancing... but that can be
done later with no mm change beyond the proposed patch.

> When the page gets rescued from the cleancache, we
> know it was recently evicted and we can immediately
> put it onto the active file list.

True, that would be another refinement.  The proposed
patch does, however, turn on WasActive so, even if the
page never makes it back to the active lru, it will
still go back into cleancache when evicted from the
pagecache.

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