> do_page_fault > 1 do_no_page > a -> do_anonymous_page -> lru_cache_add + mark_page_accessed > [essentially adding to the active list] > b -> vm_ops defined => lru_cache_add > [adding to inactive list] > 2 do_swap_page > -> lru_cache_add + mark_page_accessed > [adding to active list] > 3 do_wp_page > -> lru_cache_add [adding to inactive list] > > Why is this difference ? - why are 1a and 2 to the active list and 1b and > 3 to the inactive list ? do_wp_page() is actually called whenever a COW (copy on write) situation arises. A single physical page is duplicated for use by the two processes involved (parent and child) whenever a write happens on a page having Readonly bit set in the page table entry, but whose VMA has write permission. Couldn't it be possible that the physical page is marked accessed for one process (the one that issued the write) and for the other process it is added to the inactive list...? I'm not sure. john
Attachment:
pgp00372.pgp
Description: PGP signature