Got it. Sorry, my fault :) -zyh 2011/3/29 Michal Hocko <mhocko@xxxxxxx>: > On Tue 29-03-11 21:40:13, Zhu Yanhai wrote: >> Michal, >> IIUC it's to prevent the infinite loop, as in the end of the do-while >> there's >> if (!nr_reclaimed && >>   (next_mz == NULL || >>   loop > MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS)) >>        break; > >> so the loop will break earlier if all groups are iterated once and no >> pages are freed. > > The code (in mmotm 2011-03-10-16-42) reads: >            Âdo { >                Â[skipped comments] >                Ânext_mz = >                Â__mem_cgroup_largest_soft_limit_node(mctz); >                Âif (next_mz == mz) { >                    Âcss_put(&next_mz->mem->css); >                    Ânext_mz = NULL; >                Â} else /* next_mz == NULL or other memcg */ >                    Âbreak; >            Â} while (1); > > So we do not break out of the loop and start a new iteration if next_mz == mz > and assign next_mz again. > Am I missing something? > -- > Michal Hocko > SUSE Labs > SUSE LINUX s.r.o. > Lihovarska 1060/12 > 190 00 Praha 9 > Czech Republic > ÿô.nÇ·ÿ±ég¬±¨Âaþé»®&Þ)î¦þ)íèh¨è&£ù¢¸ÿæ¢ú»þÇþm§ÿÿÃÿ)î¦þàbnö¥yÊ{^®wr«ë&§iÖ²('Ûÿÿìm éê¯Ãí¢ÿÚ·ÚýiÉ¢¸ÿý½§$þàÿ