LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [PATCH][BUGFIX] memcg: fix leak of accounting at failure path of hugepage collapsing.
Date: Wed, 9 Feb 2011 10:51:22 +0100	[thread overview]
Message-ID: <20110209095122.GG27110@cmpxchg.org> (raw)
In-Reply-To: <20110209162324.ea7e2e52.kamezawa.hiroyu@jp.fujitsu.com>

On Wed, Feb 09, 2011 at 04:23:24PM +0900, KAMEZAWA Hiroyuki wrote:
> There was a big bug. Anyway, thank you for adding new bad_page for memcg.

That check is really awesome :-)

> mem_cgroup_uncharge_page() should be called in all failure case
> after mem_cgroup_charge_newpage() is called in 
> huge_memory.c::collapse_huge_page()
>
>  [ 4209.076861] BUG: Bad page state in process khugepaged  pfn:1e9800
>  [ 4209.077601] page:ffffea0006b14000 count:0 mapcount:0 mapping:          (null) index:0x2800
>  [ 4209.078674] page flags: 0x40000000004000(head)
>  [ 4209.079294] pc:ffff880214a30000 pc->flags:2146246697418756 pc->mem_cgroup:ffffc9000177a000
>  [ 4209.082177] (/A)
>  [ 4209.082500] Pid: 31, comm: khugepaged Not tainted 2.6.38-rc3-mm1 #1
>  [ 4209.083412] Call Trace:
>  [ 4209.083678]  [<ffffffff810f4454>] ? bad_page+0xe4/0x140
>  [ 4209.084240]  [<ffffffff810f53e6>] ? free_pages_prepare+0xd6/0x120
>  [ 4209.084837]  [<ffffffff8155621d>] ? rwsem_down_failed_common+0xbd/0x150
>  [ 4209.085509]  [<ffffffff810f5462>] ? __free_pages_ok+0x32/0xe0
>  [ 4209.086110]  [<ffffffff810f552b>] ? free_compound_page+0x1b/0x20
>  [ 4209.086699]  [<ffffffff810fad6c>] ? __put_compound_page+0x1c/0x30
>  [ 4209.087333]  [<ffffffff810fae1d>] ? put_compound_page+0x4d/0x200
>  [ 4209.087935]  [<ffffffff810fb015>] ? put_page+0x45/0x50
>  [ 4209.097361]  [<ffffffff8113f779>] ? khugepaged+0x9e9/0x1430
>  [ 4209.098364]  [<ffffffff8107c870>] ? autoremove_wake_function+0x0/0x40
>  [ 4209.099121]  [<ffffffff8113ed90>] ? khugepaged+0x0/0x1430
>  [ 4209.099780]  [<ffffffff8107c236>] ? kthread+0x96/0xa0
>  [ 4209.100452]  [<ffffffff8100dda4>] ? kernel_thread_helper+0x4/0x10
>  [ 4209.101214]  [<ffffffff8107c1a0>] ? kthread+0x0/0xa0
>  [ 4209.101842]  [<ffffffff8100dda0>] ? kernel_thread_helper+0x0/0x10
> 
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>

Thanks for debugging this.

  parent reply	other threads:[~2011-02-09  9:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  6:10 [mmotm] BUG: Bad page state in process khugepaged ? KAMEZAWA Hiroyuki
2011-02-09  6:40 ` KAMEZAWA Hiroyuki
2011-02-09  6:50 ` Daisuke Nishimura
2011-02-09  6:52   ` KAMEZAWA Hiroyuki
2011-02-09 20:07     ` Andrea Arcangeli
2011-02-11  7:02       ` Hugh Dickins
2011-02-11 10:49         ` Andrea Arcangeli
2011-02-11 19:58           ` Hugh Dickins
2011-02-11 20:24             ` Andrea Arcangeli
2011-02-14 22:24           ` Johannes Weiner
2011-02-09  7:23 ` [PATCH][BUGFIX] memcg: fix leak of accounting at failure path of hugepage collapsing KAMEZAWA Hiroyuki
2011-02-09  7:51   ` Daisuke Nishimura
2011-02-09  9:51   ` Johannes Weiner [this message]
2011-02-10  2:49   ` Minchan Kim

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=20110209095122.GG27110@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --subject='Re: [PATCH][BUGFIX] memcg: fix leak of accounting at failure path of hugepage collapsing.' \
    /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

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).