[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1348853876.2229.22.camel@thor>
Date: Fri, 28 Sep 2012 13:37:56 -0400
From: Peter Hurley <peter@...leysoftware.com>
To: "zhenzhong.duan@...cle.com" <zhenzhong.duan@...cle.com>
CC: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] x86: mtrr: Constrain WB MTRR to max phys mem prior to
cleanup
On Sun, 2012-09-09 at 23:54 -0400, zhenzhong.duan wrote:
>
> δΊ 2012-09-08 02:40, H. Peter Anvin ει:
> > On 09/07/2012 10:44 AM, Peter Hurley wrote:
> > \>
> >> diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c
> >> b/arch/x86/kernel/cpu/mtrr/cleanup.c
> >
> > I really don't like it as it introduces yet another user of max_pfn,
> > which should be going away. Furthermore, the better question is what
> > remaining needs there are for MTRR cleanup; historically the reason
> > was that it prevented the display from being mapped WC via MTRR due to
> > the MTRR conflict resolution rules favoring UC.
> For a large memory system, mtrr_cleanup offten fail in most case. Even
> if it succeed, it often occupy all of MTRR entrys.
> How was display mapped as WC in above case?
Without this patch, mtrr_cleanup could not optimize. The original MTRR
setup from BIOS remained, which left the display as UC (and a lot of log
spew).
> Why did bios give a lot of space then real mem, for hotplug?
I assume the reason was for hotplug.
An interesting side note: more recent revisions of this BIOS (rev. A11)
report one less variable MTRR (so, IA32_MTRRCAP is writable?)
> > However, the right way to fix that is to use the PAT interfaces, which
> > doesn't have this drawback -- then MTRR cleanup becomes entirely
> > superfluous and the problem goes away.
> Do you mean disable MTRR totally here?
Well, since PAT entries marked WC override all MTRR settings, whatever
the BIOS set the variable MTRRs to becomes irrelevant, so not disabled
but rather ignored.
Regards,
Peter Hurley
Powered by blists - more mailing lists