From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Hans Rosenfeld <hans.rosenfeld@amd.com>
Cc: Hugh Dickins <hugh@veritas.com>, Ingo Molnar <mingo@elte.hu>,
Jeff Chua <jeff.chua.linux@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Gabriel C <nix.or.die@googlemail.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Nishanth Aravamudan <nacc@us.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] x86: fix PAE pmd_bad bootup warning
Date: Thu, 08 May 2008 09:42:21 -0700 [thread overview]
Message-ID: <1210264941.7905.54.camel@nimitz.home.sr71.net> (raw)
In-Reply-To: <20080508161925.GH12654@escobedo.amd.com>
On Thu, 2008-05-08 at 18:19 +0200, Hans Rosenfeld wrote:
> On Thu, May 08, 2008 at 08:51:22AM -0700, Dave Hansen wrote:
> > Is there anything in your dmesg?
>
> mm/memory.c:127: bad pmd ffff810076801040(80000000720000e7).
>
> > There was a discussion on LKML in the last couple of days about
> > pmd_bad() triggering on huge pages. Perhaps we're clearing the mapping
> > with the pmd_none_or_clear_bad(), and *THAT* is leaking the page.
>
> That makes sense. I remember that explicitly munmapping the huge page
> would still work, but it doesn't. I don't quite remember what I did back
> then to test this, but I probably made some mistake there that led me to
> some false conclusions.
I can't see how it would possibly work with the code that we have today,
so I guess it was just a false assumption.
static inline int pmd_none_or_clear_bad(pmd_t *pmd)
{
if (pmd_none(*pmd))
return 1;
if (unlikely(pmd_bad(*pmd))) {
pmd_clear_bad(pmd);
return 1;
}
return 0;
}
void pmd_clear_bad(pmd_t *pmd)
{
pmd_ERROR(*pmd);
pmd_clear(pmd);
}
That pmd_clear() will simply zero out the pmd and leak the page.
Sounds like Linus had the right idea:
> I'd much rather have pdm_bad() etc fixed up instead, so that they do a
> more proper test (not thinking that a PSE page is bad, since it clearly
> isn't). And then, make them dependent on DEBUG_VM, because doing the
> proper test will be more expensive.
-- Dave
--
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>
next prev parent reply other threads:[~2008-05-08 16:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b6a2187b0805051806v25fa1272xb08e0b70b9c3408@mail.gmail.com>
[not found] ` <20080506124946.GA2146@elte.hu>
[not found] ` <Pine.LNX.4.64.0805061435510.32567@blonde.site>
[not found] ` <alpine.LFD.1.10.0805061138580.32269@woody.linux-foundation.org>
2008-05-06 19:49 ` [PATCH] x86: fix PAE pmd_bad bootup warning Hugh Dickins
2008-05-06 20:06 ` Linus Torvalds
2008-05-06 20:30 ` Hugh Dickins
2008-05-08 16:07 ` Nishanth Aravamudan
2008-05-06 20:22 ` Hans Rosenfeld
2008-05-06 20:36 ` Hugh Dickins
2008-05-07 23:39 ` Nishanth Aravamudan
2008-05-06 20:42 ` Dave Hansen
2008-05-08 14:34 ` Hans Rosenfeld
2008-05-08 14:39 ` Hans Rosenfeld
2008-05-08 14:52 ` Dave Hansen
2008-05-08 15:11 ` Hans Rosenfeld
2008-05-08 15:51 ` Dave Hansen
2008-05-08 16:19 ` Hans Rosenfeld
2008-05-08 16:33 ` Nishanth Aravamudan
2008-05-08 16:51 ` Hans Rosenfeld
2008-05-08 17:16 ` Nishanth Aravamudan
2008-05-08 18:42 ` Dave Hansen
2008-05-08 18:58 ` Hugh Dickins
2008-05-08 19:06 ` Dave Hansen
2008-05-08 18:48 ` Hugh Dickins
2008-05-08 19:49 ` Matt Mackall
2008-05-08 20:08 ` Dave Hansen
2008-05-08 20:02 ` Hans Rosenfeld
2008-05-08 20:16 ` Dave Hansen
2008-05-08 23:15 ` Dave Hansen
2008-05-14 19:01 ` Matt Mackall
2008-05-09 9:03 ` Paul Mundt
2008-05-08 16:42 ` Dave Hansen [this message]
2008-05-08 15:44 ` Nishanth Aravamudan
2008-05-07 4:40 ` Jeff Chua
2008-05-07 5:30 ` Hugh Dickins
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=1210264941.7905.54.camel@nimitz.home.sr71.net \
--to=dave@linux.vnet.ibm.com \
--cc=arjan@linux.intel.com \
--cc=hans.rosenfeld@amd.com \
--cc=hpa@zytor.com \
--cc=hugh@veritas.com \
--cc=jeff.chua.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=nacc@us.ibm.com \
--cc=nix.or.die@googlemail.com \
--cc=tglx@linutronix.de \
/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).