Re: REPOSTING: vm: detecting age of page

From: Rik van Riel (
Date: Mon May 06 2002 - 21:25:37 EST

On Mon, 6 May 2002, Reza Roboubi wrote:

> I read the following about the /proc/sys/vm/swapctl values:
> * If the page was used since the last time we scanned, its age is
> increased by sc_page_advance (default 3). Where the maximum value is
> given by sc_max_page_age (default 20).
> * Otherwise (meaning it wasn't used) its age is decreased by
> sc_page_decline (default 1).
> Question:
> How can the intel hardware detect page access if the page is mapped into
> the process' VM(and resident in RAM)? If detecting such access is
> impossible, then how does kswapd decide the page "age" in this case?

Traditionally page aging would be done on the physical page while
scanning the virtual address space of processes.

Of course, this had (in 2.0) the side effect of down aging a page
from which wasn't used in 20 processes but was used in the
3 processes that weren't asleep ;)

In the (new, experimental) reverse mapping VM Linux has pointers
from the physical pages back to the virtual mappings to the page
so it can actually get the page aging right.

kind regards,


Bravely reimplemented by the knights who say "NIH".

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:29 EST