In one of the earlier CART threads, you had mentioned that you had a way of representing each non resident page by a 32 bit value. Could you please elaborate on this? I haven't given too much thought on this, but i was thinking of a 64 bit value... upper 32 bits being pid and lower 32 being the virtual address. Would this work?
Thanks
Rahul
Rik van Riel wrote:
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.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/