On Sat, 16 Apr 2005, Bao Zhao wrote: > The following code excerpt from shrink_list function. > I think if condition B is true ,then condition A must > be true.So there have no chance of excuting the > condition B's code(when it's). Nope, sorry ... > referenced = page_referenced(page, 1); > if (referenced && page_mapping_inuse(page)) > //condition A > goto activate_locked; ... > if (page_mapped(page) && mapping) { //condition B It is perfectly possible for a page to be mapped, but not recently referenced. Note that page_referenced() clears the referenced bit, so if the page sin't referenced again condition A will be false next time... -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/