On Thu, 10 Mar 2011 14:47:52 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > On Thu, 10 Mar 2011 08:36:59 +0900 > KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > > > will add. Thank you ! > > > > Here is v4 based on feedbacks. > == > > fs/fuse/dev.c::fuse_try_move_page() does > > (1) remove a page by ->steal() > (2) re-add the page to page cache > (3) link the page to LRU if it was not on LRU at (1) > > This implies the page is _on_ LRU when it's added to radix-tree. > So, the page is added to memory cgroup while it's on LRU and > the pave will remain in the old(wrong) memcg. > By this bug, force_empty()'s LRU scan cannot find the page and > rmdir() will never ends. > > This is the same behavior as SwapCache and needs special care as > - remove page from LRU before overwrite pc->mem_cgroup. > - add page to LRU after overwrite pc->mem_cgroup. > > This will fixes memcg's rmdir() hang issue with FUSE. > > Changelog v3=v4: > - moved PageLRU() check into the leaf function. > - added comments > > Changelog v2=>v3: > - fixed double accounting. > > Changelog v1=>v2: > - clean up. > - cover !PageLRU() by pagevec case. > > Reviewed-by: Johannes Weiner <hannes@xxxxxxxxxxx> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Acked-by: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> I hope this can fix the original BZ case. Thanks, Daisuke Nishimura. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>