[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg9Qk=b5h0y=s9vUoLxAD0Nz5BrsU7g0=-ZiUFO9q3EmQ@mail.gmail.com>
Date: Mon, 20 Apr 2020 13:56:32 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: "Williams, Dan J" <dan.j.williams@...el.com>,
Andy Lutomirski <luto@...capital.net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, X86 ML <x86@...nel.org>,
stable <stable@...r.kernel.org>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
"Tsaur, Erwin" <erwin.tsaur@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-nvdimm <linux-nvdimm@...ts.01.org>
Subject: Re: [PATCH] x86/memcpy: Introduce memcpy_mcsafe_fast
On Mon, Apr 20, 2020 at 1:45 PM Luck, Tony <tony.luck@...el.com> wrote:
>
> Another X86 vendor seems to be adding something like that. See MCOMMIT
> in https://www.amd.com/system/files/TechDocs/24594.pdf
That sounds potentially very expensive.
Particularly, as you say, something like the kernel (or
virtualization) may want to at least test for it cheaply on entry or
switch or whatever.
I do think you want the mcommit kind of thing for writing, but I think
the intel model of (no longer pcommit) using a writeback instruction
with a range, and then just sfence is better than a "commit
everything" thing.
But that's just for writing things, and that's fundamentally very
different from the read side errors.
So for the read-side you'd want some kind of "lfence and report"
instruction for the "did I see load errors". Very cheap like lfence,
so that there wouldn't really be a cost for the people if somebody
_really_ want to get notified immediately.
And again, it might just be part of any serializing instruction. I
don't care that much, although overloading "serializing instruction"
even more sounds like a bad idea.
Linus
Powered by blists - more mailing lists