So here, I was just saying your desire to store more data in the page
table and expand the page flags looks complex.
Perhaps we do have a fundamental misunderstanding: For readahead, I
don't really care about the referenced part. referenced just means
pointed to by one or more vmas and active means pointed to by two or
more vmas (unless executable in which case it's one).
What I think we care about for readahead is accessed. This means a page
that got touched regardless of how many references it has. An
unaccessed unaged RA page is a less good candidate for reclaim because
it should soon be accessed (under the RA heuristics) than an accessed RA
page. Obviously if the heuristics misfire, we end up with futile RA
pages, which we read in expecting to be accessed, but which in fact
never were (so an unaccessed aged RA page) and need to be evicted.
But for me, perhaps it's enough to put unaccessed RA pages into the
active list on instantiation and then actually put them in the inactive
list when they're accessed
I'm less clear on why you think a WasActive() flag is needed. I think
you mean a member of the inactive list that was at some point previously
active.
Um, that's complex. Doesn't your inactive-C list really just identify
pages that were shared but have sunk in the LRU lists due to lack of
use?