From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH 3.3] memcg: fix GPF when cgroup removal races with last exit
Date: Sun, 04 Mar 2012 11:43:40 +0400 [thread overview]
Message-ID: <4F531D2C.7090105@openvz.org> (raw)
In-Reply-To: <4F51E4B1.4010607@openvz.org>
Konstantin Khlebnikov wrote:
> Hugh Dickins wrote:
>>
>> Konstantin, I've not yet looked into how this patch affects your
>> patchsets; but I do know that this surreptitious-switch-to-root
>> behaviour seemed nightmarish when I was doing per-memcg per-zone
>> locking (particularly inside something like __activate_page(), where
>> we del and add under a single lock), and unnecessary once you and I
>> secure the memcg differently. So you may just want to revert this in
>> patches for linux-next; but I've a suspicion that now we understand
>> it better, this technique might still be usable, and more efficient.
>
> Yes, something like that. But, I must fix my "isolated-pages" counters first,
> otherwise I just reintroduce this bug again.
>
I have thought little more and invented better approach: we can keep isolated pages
counted in lruvec->lru_size[] and vmstat counters. Thus isolated pages will prevent
removing it's memory cgroup. This method is more complicated than your tricky pushing
pages to root lruvec, but it more generic and does not adds new page-counters.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-04 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 18:37 Hugh Dickins
2012-03-03 9:30 ` Konstantin Khlebnikov
2012-03-04 7:43 ` Konstantin Khlebnikov [this message]
2012-03-05 0:24 ` KAMEZAWA Hiroyuki
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=4F531D2C.7090105@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 \
/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