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: <9fcd06f5-360e-4542-9fbb-f8c7efb28cb6@default>
Date:	Thu, 26 Jan 2012 13:28:02 -0800 (PST)
From:	Dan Magenheimer <dan.magenheimer@...cle.com>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.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>,
	riel@...hat.com, Chris Mason <chris.mason@...cle.com>
Subject: RE: [PATCH] mm: implement WasActive page flag (for improving
 cleancache)

> From: Dave Hansen [mailto:dave@...ux.vnet.ibm.com]
> Subject: Re: [PATCH] mm: implement WasActive page flag (for improving cleancache)

Thanks for the review Dave!
 
> On 01/25/2012 01:58 PM, Dan Magenheimer wrote:
> > (Feedback welcome if there is a different/better way to do this
> > without using a page flag!)
> >
> > Since about 2.6.27, the page replacement algorithm maintains
> > an "active" bit to help decide which pages are most eligible
> > to reclaim, see http://linux-mm.org/PageReplacementDesign
> >
> > This "active' information is also useful to cleancache but is lost
> > by the time that cleancache has the opportunity to preserve the
> > pageful of data.  This patch adds a new page flag "WasActive" to
> > retain the state.  The flag may possibly be useful elsewhere.
> 
> I guess cleancache itself is clearing the bit, right?  I didn't see any
> clearing going on in the patch.

No, there are no changes in cleancache.c so it isn't clearing
the bit.

> I do think it also needs to get cleared on the way in to the page
> allocator.  Otherwise:
> 
> 	PageSetWasActive(page);
> 	free_page(page);
> 	...
> 	another_user_page = get_free_page()
> 	// now cleancache sees the active bit for the prev user
> 
> Or am I missing somewhere it gets cleared non-explicitly somewhere?

True, it is not getting cleared and it should be, good catch!

I'll find the place to add the call to ClearPageWasActive() for v2.

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