On 10/14/07, shyam Burkule <[EMAIL PROTECTED]> wrote: > > > > On 10/13/07, Peter Teoh <[EMAIL PROTECTED]> wrote: > > > > I think I have understood better. > > > > On 10/13/07, shyam Burkule < [EMAIL PROTECTED]> wrote: > > > Hi > > > Now as given in fig. if there is second reference > > mark_page_accessed() > > > will invoke and then change flag PG_referenced to 1 and still page is > > in > > > inacive list.Is it really true...i mean at this point of reference > > there > > > will be cache hit and therefore controll doesnt comes to kernel. > > > And also as i think this set of PG_referenced is very important.So if > > it is > > > not true then what and how LRU moves pages across its inactive and > > active > > > list. > > > > See: > > > > http://kernel.org/doc/gorman/html/understand/understand013.html > > > > Ok, from diagram, inactive->active is done in shrink_cache(). > > > > This is point of question ....When page is in inactive list and if any > process trying to access page ,there will be cache hit.And In practice we > simple cannot modify LRU list on cache hit...so is it really true that then > function() is get called when there is reference to page,when it is in > inactive list?? If not then when page is moved from inactive to active > list?. > > > active->inactive is done in refill_inactive(). > > > > Please read in depth 10.3.2 and 10.3.1. ALl the answer is there. > > > > In particular this line: > > > > >>>From there, the function is basically a very large for-loop which > > scans at most max_scan pages to free up nr_pages pages from the end of > > the inactive_list or until the inactive_list is empty. After each > > page, it checks to see whether it should reschedule itself so that the > > swapper does not monopolise the CPU. > > > > And so I think the timing in non-deterministic, because if schedule() > > can be called after every page move from inactive_list to active_list, > > then there is no timing at all. > > > > > > -- > Shyam > "Born To Learn"
-- Shyam "Born To Learn"
