On Fri, 25 Mar 2005, Rahul Iyer wrote:
I agree... pid is not a good idea. So i thought of something else... the
swp_entry_t. What i forgot was that this is only for anonymous pages... disk
buffers and mmapped pages are not put on swap (right?). So, I'm looking at
something else now... primarily the page->private field.
You cannot use such an identifier, since the page will be
GONE after it is swapped out, meaning the identifier (which
is your lookup key) will be gone too!
I guess, what i need is an identifier to tag every page that leaves the
cache... whether anonymous, mmapped or disk buffer. Unfortunately I
cannot find such an id. Actually, this is all that holds me up... the
rest of what i need to do is in place - mentally that is. :) So, I could
really use a tip ;)
OK, here's a tip: how do the page cache code and the
page fault code decide which page to bring into memory ?