linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Jean Delvare <jdelvare@suse.de>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] dell-wmi: Stop storing pointers to DMI tables
Date: Fri, 15 Jan 2016 12:00:02 -0800	[thread overview]
Message-ID: <CALCETrWsm1OVuZQNeU-UkcdNg1rt6Wu9CKY=xc_0M9kKzedYYg@mail.gmail.com> (raw)
In-Reply-To: <1452880405.4941.0.camel@chaos.site>

On Fri, Jan 15, 2016 at 9:53 AM, Jean Delvare <jdelvare@suse.de> wrote:
> Hi Andy,
>
> Le Friday 15 January 2016 à 08:27 -0800, Andy Lutomirski a écrit :
>> FWIW, especially if we consider mapping it persistently, maybe we
>> should use ioremap_prot and map it both cached and ro.
>>
>> Actually, switching to a cached mapping regardless of persistence
>> could noticeably help boot times.  UC accesses are very, very slow.
>
> Sorry if it is obvious for everybody else, but what does "UC accesses"
> mean?
>

Sorry, I sometimes have my head buried too far in the CPU :)

UC means uncached.  ioremap, on x86, asks for an uncached mapping, so
every memory access (load or store) hits main memory individually.
Assuming that the spec says that whatever physical memory the DMI
tables live in is permitted to be used with cached accesses, asking
for the CPU cache to be permitted on those accesses will make them a
whole lot faster.

If that isn't safe, you could also just copy each table out of the
ioremap space into normal RAM as needed using MOVNTDQA.  I forget what
the helper for that is called, but it basically does a fast streaming
IO read and then writes to normal RAM, memcpy style.  Most modern CPUs
support it.

--Andy

  reply	other threads:[~2016-01-15 20:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 14:52 [PATCH] dell-wmi: Stop storing pointers to DMI tables Andy Lutomirski
2016-01-11 21:58 ` Andy Lutomirski
2016-01-12 14:25   ` Pali Rohár
2016-01-13 22:28     ` Andy Lutomirski
2016-01-14  9:52       ` Michał Kępień
2016-01-15 13:23         ` Jean Delvare
2016-01-14 14:07       ` One Thousand Gnomes
2016-01-14 20:16         ` Jean Delvare
2016-01-15 13:27       ` Jean Delvare
2016-01-15 16:27         ` Andy Lutomirski
2016-01-15 17:53           ` Jean Delvare
2016-01-15 20:00             ` Andy Lutomirski [this message]
2016-01-19  9:12               ` Jean Delvare
2016-01-14 10:29 ` Michał Kępień
2016-01-18 15:44 ` Jean Delvare
2016-01-18 18:09   ` Andy Lutomirski
2016-01-18 18:19     ` Andy Lutomirski
2016-01-19  9:19     ` Jean Delvare

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='CALCETrWsm1OVuZQNeU-UkcdNg1rt6Wu9CKY=xc_0M9kKzedYYg@mail.gmail.com' \
    --to=luto@amacapital.net \
    --cc=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).