All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	"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>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>
Subject: Re: [mmotm] BUG: Bad page state in process khugepaged ?
Date: Wed, 9 Feb 2011 21:07:28 +0100	[thread overview]
Message-ID: <20110209200728.GQ3347@random.random> (raw)
In-Reply-To: <20110209155246.69a7f3a1.kamezawa.hiroyu@jp.fujitsu.com>

On Wed, Feb 09, 2011 at 03:52:46PM +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 9 Feb 2011 15:50:01 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> 
> > > 
> > > In hex, pc->flags was 7A00000000004 and this means PCG_USED bit is set.
> > > This implies page_remove_rmap() may not be called but ->mapping is NULL. Hmm?
> > > (7A is encoding of section number.)
> > > 
> > Sigh.. it seems another freed-but-not-uncharged problem..
> > 
> 
> Ah, ok, this is maybe caused by this. I'm sorry that I missed this.
> ==
> static inline int free_pages_check(struct page *page)
> {
>         if (unlikely(page_mapcount(page) |
>                 (page->mapping != NULL)  |
>                 (atomic_read(&page->_count) != 0) |
>                 (page->flags & PAGE_FLAGS_CHECK_AT_FREE) |
>                 (mem_cgroup_bad_page_check(page)))) {    <==========(*)
>                 bad_page(page);
>                 return 1;
> ==
> 
> Then, ok, this is a memcgroup and hugepage issue.
> 
> I'll look into.

Yes, the rest of the info on the page looked ok and shouldn't have
triggered a bad_page call. Thanks so much for looking into it.

Andrea

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	"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>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>
Subject: Re: [mmotm] BUG: Bad page state in process khugepaged ?
Date: Wed, 9 Feb 2011 21:07:28 +0100	[thread overview]
Message-ID: <20110209200728.GQ3347@random.random> (raw)
In-Reply-To: <20110209155246.69a7f3a1.kamezawa.hiroyu@jp.fujitsu.com>

On Wed, Feb 09, 2011 at 03:52:46PM +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 9 Feb 2011 15:50:01 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> 
> > > 
> > > In hex, pc->flags was 7A00000000004 and this means PCG_USED bit is set.
> > > This implies page_remove_rmap() may not be called but ->mapping is NULL. Hmm?
> > > (7A is encoding of section number.)
> > > 
> > Sigh.. it seems another freed-but-not-uncharged problem..
> > 
> 
> Ah, ok, this is maybe caused by this. I'm sorry that I missed this.
> ==
> static inline int free_pages_check(struct page *page)
> {
>         if (unlikely(page_mapcount(page) |
>                 (page->mapping != NULL)  |
>                 (atomic_read(&page->_count) != 0) |
>                 (page->flags & PAGE_FLAGS_CHECK_AT_FREE) |
>                 (mem_cgroup_bad_page_check(page)))) {    <==========(*)
>                 bad_page(page);
>                 return 1;
> ==
> 
> Then, ok, this is a memcgroup and hugepage issue.
> 
> I'll look into.

Yes, the rest of the info on the page looked ok and shouldn't have
triggered a bad_page call. Thanks so much for looking into it.

Andrea

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

  reply	other threads:[~2011-02-09 20:08 UTC|newest]

Thread overview: 27+ 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:40   ` KAMEZAWA Hiroyuki
2011-02-09  6:50 ` Daisuke Nishimura
2011-02-09  6:50   ` Daisuke Nishimura
2011-02-09  6:52   ` KAMEZAWA Hiroyuki
2011-02-09  6:52     ` KAMEZAWA Hiroyuki
2011-02-09 20:07     ` Andrea Arcangeli [this message]
2011-02-09 20:07       ` Andrea Arcangeli
2011-02-11  7:02       ` Hugh Dickins
2011-02-11  7:02         ` Hugh Dickins
2011-02-11 10:49         ` Andrea Arcangeli
2011-02-11 10:49           ` Andrea Arcangeli
2011-02-11 19:58           ` Hugh Dickins
2011-02-11 19:58             ` Hugh Dickins
2011-02-11 20:24             ` Andrea Arcangeli
2011-02-11 20:24               ` Andrea Arcangeli
2011-02-14 22:24           ` Johannes Weiner
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:23   ` KAMEZAWA Hiroyuki
2011-02-09  7:51   ` Daisuke Nishimura
2011-02-09  7:51     ` Daisuke Nishimura
2011-02-09  9:51   ` Johannes Weiner
2011-02-09  9:51     ` Johannes Weiner
2011-02-10  2:49   ` Minchan Kim
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=20110209200728.GQ3347@random.random \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.