On Wed, Dec 18, 2013 at 11:59:52PM -0500, Sasha Levin wrote: >On 12/18/2013 11:29 PM, Wanpeng Li wrote: >>>PageLocked is not required by page_referenced_anon() and there is not >>>>any assertion before, commit 37f093cdf introduced this extra BUG_ON() >>There are two callsites shrink_active_list and page_check_references() >>of page_referenced(). shrink_active_list and its callee won't lock anonymous >>page, however, page_check_references() is called with anonymous page >>lock held in shrink_page_list. So page_check_references case need >>specail handling. > >This explanation seems to be based on current observed behaviour. > >I think it would be easier if you could point out the actual code in each >function that requires a page to be locked, once we have that we don't have >to care about what the callers currently do. > rmap_walk_anon() itself don't need to hold page lock. I remove it in v3. Regards, Wanpeng Li > >Thanks, >Sasha -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>