RE: [RFC] respect the referenced bit of KVM guest pages?

From: Dike, Jeffrey G
Date: Wed Sep 02 2009 - 15:31:57 EST

I'm trying to better understand the motivation for your make-mapped-exec-pages-first-class-citizens patch. As I read your (very detailed!) description, you are diagnosing a threshold effect from Rik's evict-use-once-pages-first patch where if the inactive list is slightly smaller than the active list, the active list will start being scanned, pushing text (and other) pages onto the inactive list where they will be quickly kicked out to swap.

As I read Rik's patch, if the active list is one page larger than the inactive list, then a batch of pages will get moved from one to the other. For this to have a noticeable effect on the system once the streaming is done, there must be something continuing to keep the active list larger than the inactive list. Maybe there is a consistent percentage of the streamed pages which are use-twice.

So, we a threshold effect where a small change in input (the size of the streaming file vs the number of active pages) causes a large change in output (lots of text pages suddenly start getting thrown out). My immediate reaction to that is that there shouldn't be this sudden change in behavior, and that maybe there should only be enough scanning in shink_active_list to bring the two lists back to parity. However, if there's something keeping the active list bigger than the inactive list, this will just put off the inevitable required scanning.

As for your patch, it seems like we have a problem with scanning I/O, and instead of looking at those pages, you are looking to protect some other set of pages (mapped text). That, in turn, increases pressure on anonymous pages (which is where I came in). Wouldn't it be a better idea to keep looking at those streaming pages and figure out how to get them out of memory quickly?


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