I've been working on a kernel module that simulates a page replacement algorithm.
It consists of a number of page replacement algorithms: FIFO, LRU, Clock, LFU that run concurrently each with it's own view of main memory and each with it's own page table. Only one algorithm effectively runs, while the others continue to run on their view of memory, affecting their page tables. After a certain interval, a switcher is called that compares the page fault counts of the algorithms for that interval and designates the one with the lowest page fault count as the current algorithm. The idea is to try and dynamically switch to an algorithm that is performing better.
I've got the module up and running. It reads page access data from previously run programs which consists of pairs of the form (virtual address, pid).
My question is: If I was to try and implement this scheme in the Linux Kernel, where would be a good place to start? I've been going through Mel Gorman's book but have only gone through the first couple of chapters. Could you suggest some other resources that maybe helpful for this particular endeavor?
EDIT: Sorry, this is a very broad question. Could you point out the specific parts of the memory manager I would need to look into?