mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dell-wmi: Stop storing pointers to DMI tables
Date: Tue, 19 Jan 2016 10:12:01 +0100	[thread overview]
Message-ID: <20160119101201.49c4d4c5@endymion.delvare> (raw)
In-Reply-To: <CALCETrWsm1OVuZQNeU-UkcdNg1rt6Wu9CKY=xc_0M9kKzedYYg@mail.gmail.com>

Hi Andy,

On Fri, 15 Jan 2016 12:00:02 -0800, Andy Lutomirski wrote:
> 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.

I have no idea what is allowed and what isn't, sorry. You would have to
check the SMBIOS specification but also the UEFI specification.

I have to admit I never understood why dmi_alloc is arch-specific nor
why dmi_remap is needed in the first place (and even less why
dmi_early_remap is different.) So I'm not going to mess up with that
code.

I have no idea how costly dmi_remap() is, but certainly it is being
called more and more as we can see dmi_walk() gaining in popularity. So
if anyone is worried about the performance, I'll be happy to review and
test patches.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2016-01-19  9:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 14:52 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
2016-01-19  9:12               ` Jean Delvare [this message]
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=20160119101201.49c4d4c5@endymion.delvare \
    --to=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 \
    /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

all inboxes | Powered by JetHome®