Hi,
On Tue, Feb 26, 2008 at 8:14 AM, shyam burkule <[EMAIL PROTECTED]> wrote: > Hi , > I am studing current page reaplcement policy that is LRU (actually LRU > like policy) . > > In that , whenever there is first access to page , insert > that page into inactive list ( PG_lru =1 , PG_referenced =0 ) . For second > reference , keep the page in inactive list but mark it accessed . (PG_lru =1 > and PG_referenced =0 ) . For third reference , move the page to active list > (PG_lru =1 , PG_active =1 and PG_referenced =0 ) . > > OK.... but whenever there is page fault , control comes to > handle_mm_fault . It determine causes of page fault ans accordingly handle > it . > > > > > handle_mm_fault > > | > > | > > Handle_pte_fault > > | > > | > > > ------------------------------------------------------------------ > > | | > | > > | | > | > > do_anonymous_page do_wp_page do_swap_page > > > In any case (mentioned above ), if these function allocates new page frame > then that page frame is directly get added into active list (by calling > lru_cache_add_active ) . > > I am here not unserstanding , why this algorithm directly > add new page to active list , eventhough that page has first access ? > > > Thanks > shyam > > I can't explain now, but read this: http://www.linux-security.cn/ebooks/ulk3-html/0596005652/understandlk-CHP-17-SECT-3.html#understandlk-CHP-17-SECT-3.1 I go read too, to try understand better how work LRU -- Eduardo Júnior GNU/Linux user #423272 :wq
