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]

 



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

--
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>


[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]