On Mon, Oct 25, 2010 at 11:48 AM, Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote: > On Mon, Oct 25, 2010 at 11:09:01AM +0800, KAMEZAWA Hiroyuki wrote: >> On Mon, 25 Oct 2010 12:05:50 +0900 >> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: >> >> > This changes behavior. >> > >> > This "ret" can be > 0 because migrate_page()'s return code is >> > "Return: Number of pages not migrated or error code." >> > >> > Then, >> > ret < 0 Â===> maybe ebusy >> > ret > 0 Â===> some pages are not migrated. maybe PG_writeback or some >> > ret == 0 ===> ok, all condition green. try next chunk soon. >> > >> > Then, I added "yield()" and --retrym_max for !ret cases. >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â^^^^^^^^ >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â wrong. >> >> The code here does >> >> ret == 0 ==> ok, all condition green, try next chunk. > > It seems reasonable to remove the drain operations for "ret == 0" > case. ÂThat would help large NUMA boxes noticeably I guess. > >> ret > 0 Â==> all pages are isolated but some pages cannot be migrated. maybe under I/O >> Â Â Â Â Â Âdo yield. > > Don't know how to deal with the possible "migration fail" pages -- > sorry I have no idea about that situation at all. > > Perhaps, OOM while offlining pages? > >> ret < 0 Â==> some pages may not be able to be isolated. reduce retrycount and yield() > > Makes good sense. > > Thanks, > Fengguang > Hi, Wu What about acking these two patches first which doesn't change logic too much. [PATCH 2/3] do_migrate_range: exit loop if not_managed is true. [PATCH 3/3] do_migrate_range: reduce list_empty() check. For the current, I think more work&discussion is needed and make a clean one is better. Thanks. -- Regards, --Bob -- 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/ . Don't email: <a href