From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>, "Theodore Ts'o" <tytso@mit.edu>,
Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH v5] x86: Enable fast strings on Intel if BIOS hasn't already
Date: Fri, 10 May 2013 10:25:49 +0200 [thread overview]
Message-ID: <20130510082548.GA6892@gmail.com> (raw)
In-Reply-To: <CALCETrWa64s2bMVq9xJ5FBg2NH8501V-YThVO7CrJa7-0-TVHg@mail.gmail.com>
* Andy Lutomirski <luto@amacapital.net> wrote:
> > What do you want WT for, anyway?
>
> Generically, memory regions in which writes have side effects but reads
> are just reads and should be cached.
>
> In particular, persistent (i.e. nonvolatile) memory. There's an NDA
> involved, but I can safely say (at least): there seem to be nifty
> devices that aren't quite RAM that are nonetheless presented to the
> system as RAM. Write are durable, but only if they make it out of cache
> before power fails or the CPU resets in such a way that caches are
> invalidated but not written back. UC and WC are a bit heavy-handed
> because read caching is fine. (PowerPC has nice instructions for things
> like "write this back now", but x86 seems to be missing any way other
> than WT to force data out to RAM without invalidating the cache line.)
>
> Making this work with a WT MTRR is probably doable, but it's IMO rather
> ugly. Even if I go that route, I'd still want to convince graphics
> drivers to stop wasting MTRRs, since they don't need them and they tend
> to be in short supply.
>
> Here's an example:
>
> http://www.tomshardware.com/news/Viking-ArxCis-NV-NVDIMM-RAM,21892.html
This looks potentially useful.
I'd consider your cache-attributes review and cleanups to drivers and
infrastructure to be the main upstream benefit we win from your effort.
So as long as your patches go in that general direction, and the PAT code
and its usage gets cleaner and more organized, and there's no showstopper
issue discovered, the fact that you gain ioremap_wt() for your driver is
mostly just a happy coincidence that we don't mind that much.
Maybe in the end we'd have to hide it behind some sort of
CONFIG_COMPAT_PAT trigger and turn it off on old/buggy systems - but in
the first approximation it would be nice to try and make this just a
single variant with no Kconfig complexity?
Thanks,
Ingo
next prev parent reply other threads:[~2013-05-10 8:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 5:46 [PATCH v5] x86: Enable fast strings on Intel if BIOS hasn't already Andy Lutomirski
2013-05-01 11:15 ` Ingo Molnar
2013-05-01 11:33 ` Borislav Petkov
2013-05-01 16:34 ` Theodore Ts'o
2013-05-01 16:42 ` H. Peter Anvin
2013-05-01 16:54 ` Andy Lutomirski
2013-05-01 17:35 ` H. Peter Anvin
2013-05-01 17:50 ` Andy Lutomirski
2013-05-01 17:54 ` H. Peter Anvin
2013-05-01 18:18 ` Andy Lutomirski
2013-05-10 8:25 ` Ingo Molnar [this message]
2013-05-01 17:20 ` Theodore Ts'o
2013-05-01 17:35 ` H. Peter Anvin
2013-05-01 16:51 ` Andi Kleen
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=20130510082548.GA6892@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=tytso@mit.edu \
--cc=x86@kernel.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