Re: [PATCH -mm 07/25] second chance replacement for anonymous pages

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <lee.schermerhorn@...>, <kosaki.motohiro@...>
Date: Sunday, June 8, 2008 - 11:04 am

On Fri, 6 Jun 2008 18:04:43 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:


I suspect the value does not matter all that much.  It is meant to
make the number of inactive anon pages scale sub-linearly with the
size of memory in the system, so anon pages stay on the inactive
list long enough to get referenced again, while limiting the total
number of pages the VM needs to scan to something hopefully reasonable.

This formula has worked well in our testing, but maybe wider testing
in -mm will show us it needs to be tweaked.  Too early to tell whether
scaling by PAGE_SIZE will be needed at all.
 

Added a comment and renamed the function.

.
Commented the hell out of the inactive_ratio stuff :)


All new anon pages start out on the active list.

The only way you could trigger this problem is by swapping a lot
of memory out through allocation of new memory, then freeing that
new memory and swapping the old memory back in.

That can only happen with the "add newly swapped in pages to the 
inactive list" patch applied, which is why that patch may need some
wider exposure in -mm.

It has not been problematic in our tests so far.
 

pgmoved was used in a call above.  I have gotten rid of the top
initialization instead, since it's assigned the return value from
a function.


The file pages live on a separate LRU from the anon pages.  The anon
LRU will generally be scanned much slower than the file LRU, which
makes the always deactivation harmless.


Fixed.

-- 
All rights reversed.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH -mm 07/25] second chance replacement for anonymou..., Rik van Riel, (Sun Jun 8, 11:04 am)