Re: swapout and pte_young() PG_referenced

Stephen C. Tweedie (sct@redhat.com)
Tue, 19 Jan 1999 17:46:22 GMT


Hi,

On Fri, 15 Jan 1999 17:37:00 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:

> I can see why we return 0 and we mark the page old in the swapout young
> case.

> But I can't see how can be useful marking the page PG_referenced before
> return 0 if the page is young. It's not a swap cache page, it's not a
> freeable page and shrink_mmap() can do nothing with it.

> Am I missing something again ? ;)

Yes. We might well have released the page before shrink_mmap() next
comes around to it. Think about a binary which exits and is respawned.
We want any usage information (the PG_referenced bit) to survive the
exit() so that it is not immediately evicted from cache once the process
exits and shrink_mmap starts taking an interest in it.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/