Re: [trivial PATCH] Remove pointless next_mz nullification in mem_cgroup_soft_limit_reclaim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>
ÿô.nlj·ÿ±ég¬±¨Âaþé»®&Þ)î¦þ)íèh™¨è&£ù¢¸ÿŠæ¢ú»þÇþm§ÿÿÃÿ–)î¦þŠàb‚nö¥yÊŠ{^®w­r«ë&§iÖ²('†Ûÿÿìm…éê¯Ãí¢—ÿÚ·Ÿ–ÚýiÉ¢¸ÿý½§$þŠàÿ



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]