Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690869

Re: [PATCH] efifb: allow user to disable write combined mapping.

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] efifb: allow user to disable write combined mapping.
Date Wed, 19 Jul 2017 03:20:02 +0200
Message-ID <u4LOG-1ts-7@gated-at.bofh.it> (permalink)
References <u4tRL-7a0-15@gated-at.bofh.it> <u4BPk-3zB-25@gated-at.bofh.it> <u4GP1-6Cx-41@gated-at.bofh.it> <u4HBo-79O-21@gated-at.bofh.it> <u4Ie5-7Cc-7@gated-at.bofh.it> <u4Jaa-8f4-23@gated-at.bofh.it> <u4JWy-k5-7@gated-at.bofh.it> <u4JWy-k5-15@gated-at.bofh.it> <u4KIV-PC-15@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=oXUYSFFZekz8eAq3kV87z4qlxMt6fgzZX0SwLZm9ZmQ=; b=u3z1FUG9ggKGk0E0ZfkVX5UHpct/vv3Nu0C/lFIDI7quqhCxuWgBctaVN6zyIiZU7a 0zzUyy3udgBGkwJeXlpHwTrh7427lBWPi6qg1C36qW4YLp8yu3HY2aQORpgKlQzM5AwS gpFzEJTeQLOgU4Apo8wARclqCnKZx4Usz+4t69rmoE872tq3tI5H9kE9aWa6/Cy2CY05 zzTCvJPM4Z9CDs5oKRJW7NiXYPd5NOA0qoLO0/K36DPPoLw1L+hqzCDHEpVwqwNApxwp 6E0A76i8fVgizzNjqKXpNLB2ksYAAQLBOj9AeKlfq5qM3FQ8/HgvgFywuZWNixrawnww QZhQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=oXUYSFFZekz8eAq3kV87z4qlxMt6fgzZX0SwLZm9ZmQ=; b=fiXmqgN3fl5NkWI1GvIGp52d+g2I3ob6ObzPl76xL+eHKQG5b9KMDH2reql3SKipV3 cyYvxnu0ZdTYykrrntHQaHfSBG4C9Ua9mSEBa/gh1KKslRTbxCtWcrbG42ifX6aBHxbt zxVo3xOS5QbXE2ejhvSGKXcPioGX9JdFO1M2gtr/oEfUBxu2U+UGNVEMOh+yipkBiT4l FJGw0UCrEKTlJGp9ztyFv3aYpNsuFRacCB9f4mTjwPjAphlIXRzFIhaPNBvDOQvRE9iw ZRtO5yxR09S2ZJ0e8mMTgEKTNTGw5N3mILUr4bJ02PgkbU7/CDHa+Bj+Cqo92CUj5N3l MDHQ==
X-Gm-Message-State AIVw112jcOy74N/xnjM424G3FgCfE89G22XbokM6YqcpnJugdxgA3R1P 1zGxcLuSaSY9aR5PWJb9UlVl/GgfcA==
X-Received by 10.202.107.132 with SMTP id g126mr266667oic.210.1500426950954; Tue, 18 Jul 2017 18:15:50 -0700 (PDT)
MIME-Version 1.0
X-Google-Sender-Auth YR0iDmq0ZeRM10l-vwulz38UW8U
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 55
Organization linux.* mail to news gateway
X-Original-Cc Peter Jones <pjones@redhat.com>, "the arch/x86 maintainers" <x86@kernel.org>, Dave Airlie <airlied@redhat.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, "linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Andrew Lutomirski <luto@kernel.org>, Peter Anvin <hpa@zytor.com>
X-Original-Date Tue, 18 Jul 2017 18:15:50 -0700
X-Original-Message-ID <CA+55aFz7+_DsGRk1weqBNcX6GavK6rUUMSk5oaSbt4yp=EGt=Q@mail.gmail.com>
X-Original-References <20170718060909.5280-1-airlied@redhat.com> <20170718143404.omgxrujngj2rhiya@redhat.com> <CA+55aFwKzwDPYFsPpuQNfBaS-dL2aD0=z1hGEnkaTT1MMfWB6Q@mail.gmail.com> <CAPM=9tyWv79U9=-YNacf34don_Gn5RGggBsZG7R9FNuV8_qe1g@mail.gmail.com> <CAPM=9twtiyJb2M3tBBb6Xy3ausVxhn3Be+NTr+BAV9FTMGPkug@mail.gmail.com> <CA+55aFyU3QrFeq4Lr9tgxR+6D9-eXZFZTzfqHdozHS72qE5q1w@mail.gmail.com> <CAPM=9twzgAJir3b+3UAxOfuTtOBTp2bUtoCcTawmHcEbcVAEew@mail.gmail.com> <CAPM=9twsWFjFcgjP6S4wt7-t9-wYP_gBH1zt6kL-CF4Tr7t2dg@mail.gmail.com> <CAPM=9tyE88nz92e252vqgoqAK+OUut3EZKzTu9L8nwLE_hLQkQ@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1690869

Show key headers only | View raw


On Tue, Jul 18, 2017 at 5:00 PM, Dave Airlie <airlied@gmail.com> wrote:
>
> More digging:
> Single CPU system:
> Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
> 01:00.1 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200EH
>
> Now I can't get efifb to load on this (due to it being remote and I've
> no idea how to make
> my install efi onto it), but booting with no framebuffer, and running
> the tests on the mga,
> show no slowdown on this.

Is it actually using write-combining memory without a frame buffer,
though? I don't think it is. So the lack of slowdown might be just
from that.

> Now I'm starting to wonder if it's something that only happens on
> multi-socket systems.

Hmm. I guess that's possible, of course.

[ Wild and crazy handwaving... ]

Without write combining, all the uncached writes will be fully
serialized and there is no buffering in the chip write buffers. There
will be at most one outstanding PCI transaction in the uncore write
buffer.

In contrast, _with_ write combining, the write buffers in the uncore
can fill up.

But why should that matter? Maybe memory ordering. When one of the
cores (doesn't matter *which* core) wants to get a cacheline for
exclusive use (ie it did a write to it), it will need to invalidate
cachelines in other cores. However, the uncore now has all those PCI
writes buffered, and the write ordering says that they should happen
before the memory writes. So before it can give the core exclusive
ownership of the new cacheline, it needs to wait for all those
buffered writes to be pushed out, so that no other CPU can see the new
write *before* the device saw the old writes.

But I'm not convinced this is any different in a multi-socket
situation than it is in a single-socket one. The other cores on the
same socket should not be able to see the writes out of order
_either_.

And honestly, I think PCI write posting rules makes the above crazy
handwaving completely bogus anyway. Writes _can_ be posted, so the
memory ordering isn't actually that tight.

I dunno. I really think it would be good if somebody inside Intel
would look at it..

             Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] efifb: allow user to disable write combined mapping. Peter Jones <pjones@redhat.com> - 2017-07-18 16:40 +0200
  Re: [PATCH] efifb: allow user to disable write combined mapping. Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-18 22:00 +0200
    Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-18 22:50 +0200
      Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-18 23:30 +0200
        Re: [PATCH] efifb: allow user to disable write combined mapping. Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-19 00:30 +0200
          Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-19 01:20 +0200
            Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-19 01:20 +0200
              Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-19 02:10 +0200
                Re: [PATCH] efifb: allow user to disable write combined mapping. Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-19 03:20 +0200
                Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-20 06:10 +0200
                Re: [PATCH] efifb: allow user to disable write combined mapping. Andy Lutomirski <luto@kernel.org> - 2017-07-20 06:30 +0200
                Re: [PATCH] efifb: allow user to disable write combined mapping. Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-20 06:50 +0200
                Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-21 06:30 +0200
          Re: [PATCH] efifb: allow user to disable write combined mapping. Ingo Molnar <mingo@kernel.org> - 2017-07-20 12:30 +0200
  Re: [PATCH] efifb: allow user to disable write combined mapping. Dave Airlie <airlied@gmail.com> - 2017-07-25 06:10 +0200
    Re: [PATCH] efifb: allow user to disable write combined mapping. Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-07-25 11:00 +0200

csiph-web