From: Zhu Yanhai <zhu.yanhai@gmail.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: linux-mm@kvack.org, Balbir Singh <balbir@linux.vnet.ibm.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [trivial PATCH] Remove pointless next_mz nullification in mem_cgroup_soft_limit_reclaim
Date: Tue, 29 Mar 2011 21:50:51 +0800 [thread overview]
Message-ID: <AANLkTikkQnpZn0ouGgLH7-1T5zYQPU9kZ-yh3xj6vfPs@mail.gmail.com> (raw)
In-Reply-To: <20110329134547.GC3361@tiehlicka.suse.cz>
Got it. Sorry, my fault :)
-zyh
2011/3/29 Michal Hocko <mhocko@suse.cz>:
> 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
>
next prev parent reply other threads:[~2011-03-29 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 13:28 Michal Hocko
2011-03-29 13:40 ` Zhu Yanhai
2011-03-29 13:45 ` Michal Hocko
2011-03-29 13:50 ` Zhu Yanhai [this message]
2011-03-30 2:09 ` Daisuke Nishimura
2011-03-30 7:02 ` [trivial PATCH v2] " Michal Hocko
2011-03-30 7:18 ` Daisuke Nishimura
2011-03-30 8:55 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikkQnpZn0ouGgLH7-1T5zYQPU9kZ-yh3xj6vfPs@mail.gmail.com \
--to=zhu.yanhai@gmail.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=nishimura@mxp.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox