Re: [PATCH] mm: implement WasActive page flag (for improving cleancache)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]