On Thu, 10 Mar 2005, Rahul Iyer wrote:
Unfortunately, there is no pointer from struct page to the page table
entry (struct pte_t) using the page, probably because there may be more
than one. I then looked at rmap.h and rmap.c in 2.6.11. In those files i
saw page_referenced(...). From what i gather, this function tests and
clears the referenced flag for the given pages. Am I right?
Yes. The code in rmap.c provides all the infrastructure you
need to check the referenced bit on a per physical page basis.
Another question... what is ignore_token? As I saw from the source,
I couldn't get the logic behind this bit.
Please read the paper referenced from mm/thrash.c ;)
Unfortunately the implementation in the upstream kernel was
made by me in only a day and a half, and the code needs a
lot of work to run smoothly under low loads. The algorithm
does seem to work very well under high loads, though ...
P.S: Are all pages that are not backed by files (mmap'd) called anonymous
pages?
Yes.