From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Michal Hocko <mhocko@suse.cz>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] memcg: fix use_hierarchy css_is_ancestor oops regression
Date: Mon, 11 Jun 2012 11:29:25 +0400 [thread overview]
Message-ID: <4FD59E55.3030703@openvz.org> (raw)
In-Reply-To: <20120610221516.GJ1761@cmpxchg.org>
Johannes Weiner wrote:
> On Sun, Jun 10, 2012 at 11:54:47AM -0700, Hugh Dickins wrote:
>> If use_hierarchy is set, reclaim testing soon oopses in css_is_ancestor()
>> called from __mem_cgroup_same_or_subtree() called from page_referenced():
>> when processes are exiting, it's easy for mm_match_cgroup() to pass along
>> a NULL memcg coming from a NULL mm->owner.
>>
>> Check for that in __mem_cgroup_same_or_subtree(). Return true or false?
>> False because we cannot know if it was in the hierarchy, but also false
>> because it's better not to count a reference from an exiting process.
>>
>> Signed-off-by: Hugh Dickins<hughd@google.com>
>
> Looks like an older version of the patch that introduced it slipped
> into the tree, Konstantin noted this problem during review. The final
> version did
>
> match = memcg&& __mem_cgroup_same_or_subtree(root, memcg);
>
> in the caller because of it.
>
> Do you think it would be cleaner this way, since this is also the
> place where that memcg is looked up, and so the "can return NULL"
> handling after mem_cgroup_from_task() would be in the same place?
I agree, it cleaner, but nevertheless:
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Thanks, Hugh!
>
> But either way,
>
> Acked-by: Johannes Weiner<hannes@cmpxchg.org>
>
> Thanks, Hugh!
>
> --
> 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>
--
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:[~2012-06-11 7:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-10 18:54 Hugh Dickins
2012-06-10 22:15 ` Johannes Weiner
2012-06-10 22:53 ` Hugh Dickins
2012-06-11 7:29 ` Konstantin Khlebnikov [this message]
2012-06-11 7:05 ` Kamezawa Hiroyuki
2012-06-11 7:34 ` 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=4FD59E55.3030703@openvz.org \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
/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