Subject: Re: pmap_is_referenced() -- not used?
To: Lars Heidieker <paradoxix@heidieker.de>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 01/26/2001 09:42:33
On Fri, Jan 26, 2001 at 06:30:42PM +0100, Lars Heidieker wrote:
> Sure, but why would you leave a page on the active queue (quiet near the
> front) if its referenced, to scan it again on the next invocation of the
> scanner? By this you scan the front of the list to hard. (Not giving a
Remember, the scanner doesn't run constantly -- the scanner only runs when
there is memory pressure.
If it's referenced, you want to "wait a while" to check if it's referenced
again. If you're:
1 -> 2 -> 3 -> 4 -> 5 -> 6
|
check ref
1 -> 2 -> 3 -> 5 -> 6 -> 4
...then you're going to scan 4 again too soon, and move it to the inactive
list prematurely. You're also going to create more work for yourself by
giving yourself more pages to scan. You could get into an infinite loop
if you have lots of frequently access pages on an MP system.
> referenced page a chance to get referenced again between two invocations of
> the scanner) Recently referenced pages at the front might be forced to the
> inactive list even if there are "not so recently used ones" further on in the
> queue. Thats the way it looks to me. In both cases it can happen that all
> pages on the active queue are referenced, so you have to scan across all of
> them twice (in any case) and the scanner always starts at the front at
> invocation.
Yes, but remember, in my patch, pages on the inactive list can *also* be
referenced, because I do not revoke thier mappings. So if one of those
recently access pages at the head of the list is moved to inactive list,
it's okay.
--
-- Jason R. Thorpe <thorpej@zembu.com>