From: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Ying Han <yinghan@google.com>, Tejun Heo <htejun@gmail.com>,
Glauber Costa <glommer@parallels.com>,
Li Zefan <lizefan@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v4 4/6] memcg: simplify mem_cgroup_iter
Date: Fri, 15 Feb 2013 17:24:58 +0900 [thread overview]
Message-ID: <511DF0DA.7020906@jp.fujitsu.com> (raw)
In-Reply-To: <1360848396-16564-5-git-send-email-mhocko@suse.cz>
(2013/02/14 22:26), Michal Hocko wrote:
> Current implementation of mem_cgroup_iter has to consider both css and
> memcg to find out whether no group has been found (css==NULL - aka the
> loop is completed) and that no memcg is associated with the found node
> (!memcg - aka css_tryget failed because the group is no longer alive).
> This leads to awkward tweaks like tests for css && !memcg to skip the
> current node.
>
> It will be much easier if we got rid off css variable altogether and
> only rely on memcg. In order to do that the iteration part has to skip
> dead nodes. This sounds natural to me and as a nice side effect we will
> get a simple invariant that memcg is always alive when non-NULL and all
> nodes have been visited otherwise.
>
> We could get rid of the surrounding while loop but keep it in for now to
> make review easier. It will go away in the following patch.
>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
nice.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-02-15 8:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 13:26 [PATCH v4 -mm] rework mem_cgroup iterator Michal Hocko
2013-02-14 13:26 ` [PATCH v4 1/6] memcg: keep prev's css alive for the whole mem_cgroup_iter Michal Hocko
2013-02-14 13:26 ` [PATCH v4 2/6] memcg: rework mem_cgroup_iter to use cgroup iterators Michal Hocko
2013-02-15 8:03 ` Kamezawa Hiroyuki
2013-02-15 8:11 ` Michal Hocko
2013-02-15 8:13 ` Kamezawa Hiroyuki
2013-02-14 13:26 ` [PATCH v4 3/6] memcg: relax memcg iter caching Michal Hocko
2013-02-15 8:08 ` Michal Hocko
2013-02-15 8:19 ` Kamezawa Hiroyuki
2013-02-14 13:26 ` [PATCH v4 4/6] memcg: simplify mem_cgroup_iter Michal Hocko
2013-02-15 8:24 ` Kamezawa Hiroyuki [this message]
2013-02-14 13:26 ` [PATCH v4 5/6] memcg: further " Michal Hocko
2013-02-14 13:26 ` [PATCH v4 6/6] cgroup: remove css_get_next Michal Hocko
2013-03-13 15:08 ` [PATCH v4 -mm] rework mem_cgroup iterator 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=511DF0DA.7020906@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=glommer@parallels.com \
--cc=hannes@cmpxchg.org \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=mhocko@suse.cz \
--cc=yinghan@google.com \
/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;
as well as URLs for NNTP newsgroup(s).