Quoting Rahul Iyer <rni@xxxxxxxxxxxxxx>: > Hi all, > I was trying to understand the page replacement code on kernel 2.6.10. I > was looking at the code for kswapd and from what i gather, it seems like > kswapd is woken up only in low memory situations... am i right? Also, is > it true that there is no kernel thread that ages the pages (struct page > has no page->age field). I have gone through documentation for the linux > kernel MM and Mel Gorman's seems to be the closest to it. I have also > read Rik's doc on Page replacement in the 2.4 kernel, which talks of > page aging. These 2 seem to contradict... :( > > All in all, i'm buried in documentation and conflicting code... > oh save me!!!! :D > > Thanks in Advance > Rahul I'm trying to understand the same thing. I've been trying to find out which pages are used by which process and it's been a nightmare because the page swapping seems to be handled seperately. I havn't read Mel Gormans article yet, I'm still reading the scheduler documentation by Josh Aas, but I think you're right, and it will only start page swapping when memory's low because once page swapping starts, processing slows down a lot and it's going to want to avoid that. I think a lot of the confusion is due to linux being configured for running on a server and handling multiple machines. You're likely working on a different problem than I am (I've ended up trying to reduce the time wasted page swapping indirectly by allocating larger timeslices when memory is high), but I think I've come accross the same areas of code as you so I'll see if I can find it later and get back to you. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/