From: "Jan Beulich" <JBeulich@suse.com>
To: "xen-devel" <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>
Subject: [Xen-devel] [PATCH] page-alloc: accompany BUG() with printk()
Date: Wed, 15 May 2019 02:44:07 -0600 [thread overview]
Message-ID: <5CDBD157020000780022F1EA@prv1-mh.provo.novell.com> (raw)
Message-ID: <20190515084407.7v94vOdQmdcB_4qDN9pNH7ZqeZua0ppdEgfNJD5TNyY@z> (raw)
Log information likely relevant for understanding why the BUG()s were
triggering.
Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -984,7 +984,15 @@ static struct page_info *alloc_heap_page
for ( i = 0; i < (1 << order); i++ )
{
/* Reference count must continuously be zero for free pages. */
- BUG_ON((pg[i].count_info & ~PGC_need_scrub) != PGC_state_free);
+ if ( (pg[i].count_info & ~PGC_need_scrub) != PGC_state_free )
+ {
+ printk(XENLOG_ERR
+ "pg[%u] MFN %"PRI_mfn" c=%#lx o=%u v=%#lx t=%#x\n",
+ i, mfn_x(page_to_mfn(pg + i)),
+ pg[i].count_info, pg[i].v.free.order,
+ pg[i].u.free.val, pg[i].tlbflush_timestamp);
+ BUG();
+ }
/* PGC_need_scrub can only be set if first_dirty is valid */
ASSERT(first_dirty != INVALID_DIRTY_IDX || !(pg[i].count_info & PGC_need_scrub));
@@ -1393,6 +1401,11 @@ static void free_heap_pages(
break;
default:
+ printk(XENLOG_ERR
+ "pg[%u] MFN %"PRI_mfn" c=%#lx o=%u v=%#lx t=%#x\n",
+ i, mfn_x(page_to_mfn(pg + i)),
+ pg[i].count_info, pg[i].v.free.order,
+ pg[i].u.free.val, pg[i].tlbflush_timestamp);
BUG();
}
@@ -2336,7 +2349,15 @@ void free_domheap_pages(struct page_info
for ( i = 0; i < (1 << order); i++ )
{
- BUG_ON((pg[i].u.inuse.type_info & PGT_count_mask) != 0);
+ if ( pg[i].u.inuse.type_info & PGT_count_mask )
+ {
+ printk(XENLOG_ERR
+ "pg[%u] MFN %"PRI_mfn" c=%#lx o=%u v=%#lx t=%#x\n",
+ i, mfn_x(page_to_mfn(pg + i)),
+ pg[i].count_info, pg[i].v.free.order,
+ pg[i].u.free.val, pg[i].tlbflush_timestamp);
+ BUG();
+ }
arch_free_heap_page(d, &pg[i]);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2019-05-15 8:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 8:44 Jan Beulich [this message]
2019-05-15 8:44 ` [Xen-devel] [PATCH] page-alloc: accompany BUG() with printk() Jan Beulich
2019-05-15 9:30 ` Wei Liu
2019-05-15 9:30 ` [Xen-devel] " Wei Liu
2019-05-15 9:44 ` Roger Pau Monné
2019-05-15 9:44 ` [Xen-devel] " Roger Pau Monné
2019-05-15 9:59 ` Andrew Cooper
2019-05-15 9:59 ` [Xen-devel] " Andrew Cooper
2019-05-15 10:09 ` Roger Pau Monné
2019-05-15 10:09 ` [Xen-devel] " Roger Pau Monné
2019-05-15 10:12 ` Andrew Cooper
2019-05-15 10:12 ` [Xen-devel] " Andrew Cooper
2019-05-15 10:03 ` Andrew Cooper
2019-05-15 10:03 ` [Xen-devel] " Andrew Cooper
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=5CDBD157020000780022F1EA@prv1-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).