Hi Bithika... > I know that PFNs need not be in numerical order in the active list. > So let me rephrase my question. We consider five pages X1, X2, X3, > X4, X5 inserted into the head of the active list in the order of page > faults let's say as follows > > X1 -> X3 -> X4 -> X2 -> X5. OK, let's assume this is the initial position. > Now when new pages are brought in and added to the head of the active > list we should see X1 move down the active list gradually as follows > as we read the active list at different instants of time. > > X8 -> X100 -> X1 -> X3 -> X4 -> X2 -> X5. > X50 -> X35 -> X75 -> X8 -> X100 -> X1 -> X3 -> X4 -> X2 -> X5. > ... > > However, I see instead that X1 starts at the head, goes back to a > position 10 in the list and in the next instant comes back to > position 8 then goes back to position 15 etc. > > Each reading is captured at the interval of 1 second. And I read the > first 200 elements of the active list. > > I would think, X1 should have moved behind in the active list until I > see it no more (after the first 200 elements) and another page fault > may bring it to the head of the active list. Instead what I see is, > within a fraction of 1 second, X1 goes to position 10, comes back to > position 8 and goes back to postion 15. What am I missing? My best guess is: "something" goes very fast (shorter than 1 second) and within this short interval, X1 may get referenced and then abandoned then what you see is it moves back and forth in big leap. Also, IMHO, page fault itself isn't the only reason a page is brought closer to the head. For example, if the page belongs to a page cache and it is freshly referenced (again?), then it will go back to the head of active list. I think there are many more possibilities, but this is the one I can offer. Since something like I described above can happen anytime, anywhere in the kernel code path, the net result is a dynamic movement of pages in both active and inactive list. Perhaps Rik van Riel or Arjan van de Ven can explain better than I do... regards, Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/