From: Dave Jones <davej@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: nickpiggin@yahoo.com.au, linux-kernel@vger.kernel.org
Subject: Re: mm/rmap.c negative page map count BUG.
Date: Wed, 4 Jan 2006 18:56:31 -0500 [thread overview]
Message-ID: <20060104235631.GB29634@redhat.com> (raw)
In-Reply-To: <20060104155326.351a9c01.akpm@osdl.org>
On Wed, Jan 04, 2006 at 03:53:26PM -0800, Andrew Morton wrote:
> Dave Jones <davej@redhat.com> wrote:
> >
> > > Can you print ->flags, ->count, ->mapping, etc instead of going BUG?
> >
> > I can add some instrumentation like this though, and see what turns up.
>
> Can we get that instrumentation into the upstream kernel please? We do
> seem to be hitting rmap assertions too often for it to be dud
> hardware/bodgy drivers/etc.
This is what I came up with..
anything missing ?
Dave
--- linux-2.6.14/mm/rmap.c~ 2006-01-03 08:53:32.000000000 -0500
+++ linux-2.6.14/mm/rmap.c 2006-01-03 08:58:19.000000000 -0500
@@ -484,6 +484,13 @@ void page_remove_rmap(struct page *page)
BUG_ON(PageReserved(page));
if (atomic_add_negative(-1, &page->_mapcount)) {
+ if (page_mapcount(page) < 0) {
+ printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page->_mapcount);
+ printk (KERN_EMERG " page->flags = %x\n", page->flags);
+ printk (KERN_EMERG " page->count = %x\n", page->_count);
+ printk (KERN_EMERG " page->mapping = %p\n", page->mapping);
+ }
+
BUG_ON(page_mapcount(page) < 0);
/*
* It would be tidy to reset the PageAnon mapping here,
next prev parent reply other threads:[~2006-01-04 23:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-03 8:26 mm/rmap.c negative page map count BUG Dave Jones
2006-01-03 11:42 ` Nick Piggin
2006-01-03 13:53 ` Dave Jones
2006-01-04 23:53 ` Andrew Morton
2006-01-04 23:56 ` Dave Jones [this message]
2006-01-05 0:16 ` Andrew Morton
2006-01-05 0:31 ` Dave Jones
2006-01-05 7:47 ` Dave Jones
2006-01-05 8:11 ` Arjan van de Ven
2006-01-05 11:15 ` Dave Jones
2006-01-05 11:18 ` Arjan van de Ven
2006-01-05 11:26 ` Dave Jones
2006-01-05 19:00 ` Octavio Alvarez
2006-01-11 8:01 ` Octavio Alvarez Piza
2006-01-11 16:12 ` Hugh Dickins
2006-01-11 16:21 ` Arjan van de Ven
2006-01-11 16:58 ` Octavio Alvarez Piza
2006-01-11 17:18 ` Hugh Dickins
2006-01-11 17:24 ` Andrew Morton
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=20060104235631.GB29634@redhat.com \
--to=davej@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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.