Messages in this thread | | | Date | Tue, 25 Jan 2011 17:31:23 +0900 | From | Daisuke Nishimura <> | Subject | Re: [PATCH 3/3] memcg: fix race at move_parent around compound_order() |
| |
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>
| |