From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE
Date: Fri, 27 Dec 2013 12:38:47 +0200 [thread overview]
Message-ID: <20131227103847.GA19453@node.dhcp.inet.fi> (raw)
In-Reply-To: <1388114452-30769-1-git-send-email-sasha.levin@oracle.com>
On Thu, Dec 26, 2013 at 10:20:52PM -0500, Sasha Levin wrote:
> Most of the VM_BUG_ON assertions are performed on a page. Usually, when
> one of these assertions fails we'll get a BUG_ON with a call stack and
> the registers.
>
> I've recently noticed based on the requests to add a small piece of code
> that dumps the page to various VM_BUG_ON sites that the page dump is quite
> useful to people debugging issues in mm.
>
> This patch adds a VM_BUG_ON_PAGE(cond, page) which beyond doing what
> VM_BUG_ON() does, also dumps the page before executing the actual BUG_ON.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
I like the idea. One thing I've noticed you have a lot of page flag based
asserts, like:
VM_BUG_ON_PAGE(PageLRU(page), page);
VM_BUG_ON_PAGE(!PageLocked(page), page);
What about adding per-page-flag assert macros, like:
PageNotLRU_assert(page);
PageLocked_assert(page);
? This way we will always dump right page on bug.
--
Kirill A. Shutemov
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE
Date: Fri, 27 Dec 2013 12:38:47 +0200 [thread overview]
Message-ID: <20131227103847.GA19453@node.dhcp.inet.fi> (raw)
In-Reply-To: <1388114452-30769-1-git-send-email-sasha.levin@oracle.com>
On Thu, Dec 26, 2013 at 10:20:52PM -0500, Sasha Levin wrote:
> Most of the VM_BUG_ON assertions are performed on a page. Usually, when
> one of these assertions fails we'll get a BUG_ON with a call stack and
> the registers.
>
> I've recently noticed based on the requests to add a small piece of code
> that dumps the page to various VM_BUG_ON sites that the page dump is quite
> useful to people debugging issues in mm.
>
> This patch adds a VM_BUG_ON_PAGE(cond, page) which beyond doing what
> VM_BUG_ON() does, also dumps the page before executing the actual BUG_ON.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
I like the idea. One thing I've noticed you have a lot of page flag based
asserts, like:
VM_BUG_ON_PAGE(PageLRU(page), page);
VM_BUG_ON_PAGE(!PageLocked(page), page);
What about adding per-page-flag assert macros, like:
PageNotLRU_assert(page);
PageLocked_assert(page);
? This way we will always dump right page on bug.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2013-12-27 11:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 3:20 [PATCH] mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE Sasha Levin
2013-12-27 3:20 ` Sasha Levin
2013-12-27 10:38 ` Kirill A. Shutemov [this message]
2013-12-27 10:38 ` Kirill A. Shutemov
2013-12-27 22:19 ` Sasha Levin
2013-12-27 22:19 ` Sasha Levin
2013-12-27 22:26 ` Andrew Morton
2013-12-27 22:26 ` Andrew Morton
2013-12-27 23:19 ` Sasha Levin
2013-12-27 23:19 ` Sasha Levin
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=20131227103847.GA19453@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sasha.levin@oracle.com \
/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.