From: Toshi Kani <toshi.kani@hp.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: bp@alien.de, mingo@elte.hu, tglx@linutronix.de,
linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [PATCH] x86: adjust default caching mode translation tables
Date: Wed, 22 Jul 2015 10:48:01 -0600 [thread overview]
Message-ID: <1437583681.3214.270.camel@hp.com> (raw)
In-Reply-To: <55AFE2B2020000780009437E@prv-mh.provo.novell.com>
On Wed, 2015-07-22 at 10:36 -0600, Jan Beulich wrote:
> >
> > > > On 22.07.15 at 18:06, <toshi.kani@hp.com> wrote:
> > On Wed, 2015-07-22 at 09:41 -0600, Jan Beulich wrote:
> > > >
> > > > > > On 22.07.15 at 17:23, <toshi.kani@hp.com> wrote:
> > > > On Wed, 2015-07-22 at 09:17 -0600, Jan Beulich wrote:
> > > > > >
> > > > > > > > On 22.07.15 at 00:29, <toshi.kani@hp.com> wrote:
> > > > > > On Mon, 2015-07-20 at 08:46 +0100, Jan Beulich wrote:
> > > > > > > Make WT really mean WT (rather than UC).
> > > > > > >
> > > > > > > I can't see why commit 9cd25aac1f ("x86/mm/pat: Emulate PAT
> > > > > > > when
> > > > > > > it
> > > > > > > is
> > > > > > > disabled") didn't make this match its changes to pat_init().
> > > > > >
> > > > > > No, the default values need to be set to the fallback types,
> > > > > > i.e.
> > > > > > minimal
> > > > > > supported mode. For WC and WT, UC is the fallback type.
> > > > >
> > > > > But why would that be?
> > > > >
> > > > > > When PAT is disabled, pat_init() does update the tables below
> > > > > > to
> > > > > > enable
> > > > > > WT
> > > > > > per the default BIOS setup. However, when PAT is enabled, but
> > > > > > CPU
> > > > > > has
> > > > > > PAT
> > > > > > -errata, WT falls back to UC per the default values.
> > > > >
> > > > > PAT related errata I'm aware of are related to either page size
> > > > > or
> > > > > the number of bits used to index into the PAT MSR, but never to
> > > > > a particular memory type. Are you saying there are errata which
> > > > > make use of WT or WC impossible altogether? Otherwise I would
> > > > > have thought (even more so in the absence of any comment
> > > > > saying otherwise - "minimal supported modes" doesn't really say
> > > > > on what basis the set is the minimal one) that the mode systems
> > > > > come up in (compatible with pre-PAT) ought to be what the tables
> > > > > express.
> > > >
> > > > Please take a look at the comments in pat_init(). WT uses slot 7
> > > > (not
> > > > slot
> > > > 1) in the regular case.
> > >
> > > But that is an adjustment Linux makes to the default the system
> > > comes up in. And again - in my opinion the pre-initialized table
> > > values should reflect the mode the system comes up in (i.e.
> > > correct prior to execution reaching pat_init()), and be updated
> > > (which as it seems happens in all three possible cases) once the
> > > MSR gets fiddled with.
> >
> > 'enum page_cache_mode' thru __cachemode2pte_tbl[] is a high-level
> > abstraction that can be used after pat_init(). For early boot-time,
> > __early_ioremap() takes pgprot_t directly.
> >
> > Do you have a need to use __cachemode2pte_tbl[] before pat_init()?
>
> No. I just noticed the (apparent?) inconsistency.
I will update the comment of __cachemode2pte_tbl[] to avoid such confusion.
Thanks,
-Toshi
prev parent reply other threads:[~2015-07-22 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 7:46 [PATCH] x86: adjust default caching mode translation tables Jan Beulich
2015-07-21 9:38 ` [tip:x86/urgent] x86/mm/pat: Adjust " tip-bot for Jan Beulich
2015-07-22 15:09 ` Toshi Kani
2015-07-26 8:33 ` [tip:x86/urgent] x86/mm/pat: Revert ' Adjust default caching mode translation tables' tip-bot for Thomas Gleixner
2015-07-21 22:29 ` [PATCH] x86: adjust default caching mode translation tables Toshi Kani
2015-07-22 15:17 ` Jan Beulich
2015-07-22 15:23 ` Toshi Kani
2015-07-22 15:41 ` Jan Beulich
2015-07-22 16:06 ` Toshi Kani
2015-07-22 16:36 ` Jan Beulich
2015-07-22 16:48 ` Toshi Kani [this message]
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=1437583681.3214.270.camel@hp.com \
--to=toshi.kani@hp.com \
--cc=JBeulich@suse.com \
--cc=bp@alien.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 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.