From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [PATCH 3/3] memcg: fix race at move_parent around compound_order()
Date: Tue, 25 Jan 2011 17:31:23 +0900 [thread overview]
Message-ID: <20110125173123.08359210.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20110125150516.fb2f5e06.kamezawa.hiroyu@jp.fujitsu.com>
On Tue, 25 Jan 2011 15:05:16 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> Based on
> 2.6.38-rc2 +
> mm-memcontrolc-fix-uninitialized-variable-use-in-mem_cgroup_move_parent.patch
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> A fix up mem_cgroup_move_parent() which use compound_order() in
> asynchrnous manner. This compound_order() may return unknown value
> because we don't take lock. Use PageTransHuge() and HPAGE_SIZE instead of
> it.
>
> Also clean up for mem_cgroup_move_parent().
> - remove unnecessary initialization of local variable.
> - rename charge_size -> page_size
> - remove unnecessary (wrong) comment.
> - added a comment about THP.
>
> Changelog:
> - fixed page size calculation for avoiding race.
>
> Note:
> Current design take compound_page_lock() in caller of move_account().
> This should be revisited when we implement direct move_task of hugepage
> without splitting.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-01-25 8:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 5:57 [PATCH 0/3] 3 bugfixes for memory cgroup (2.6.38-rc2) KAMEZAWA Hiroyuki
2011-01-25 6:00 ` [PATCH 1/3] memcg: fix account leak at failure of memsw acconting KAMEZAWA Hiroyuki
2011-01-25 7:07 ` Johannes Weiner
2011-01-25 8:31 ` Daisuke Nishimura
2011-01-25 6:01 ` [PATCH 2/3] memcg: bugfix check mem_cgroup_disabled() at split fixup KAMEZAWA Hiroyuki
2011-01-25 6:05 ` [PATCH 3/3] memcg: fix race at move_parent around compound_order() KAMEZAWA Hiroyuki
2011-01-25 7:07 ` Johannes Weiner
2011-01-25 8:31 ` Daisuke Nishimura [this message]
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=20110125173123.08359210.nishimura@mxp.nes.nec.co.jp \
--to=nishimura@mxp.nes.nec.co.jp \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=hannes@cmpxchg.org \
--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