[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <929b76df-7da8-9147-3939-5e044f9d7728@intel.com>
Date: Thu, 6 Aug 2020 16:08:47 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
Tony Luck <tony.luck@...el.com>,
Cathy Zhang <cathy.zhang@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
Kyung Min Park <kyung.min.park@...el.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
linux-kernel@...r.kernel.org,
Ricardo Neri <ricardo.neri@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-edac@...r.kernel.org
Subject: Re: [PATCH v3] x86/cpu: Use SERIALIZE in sync_core() when available
On 8/6/20 4:04 PM, Ricardo Neri wrote:
> * CPUID is the conventional way, but it's nasty: it doesn't
> * exist on some 486-like CPUs, and it usually exits to a
> * hypervisor.
> *
> * The SERIALIZE instruction is the most straightforward way to
> * do this as it does not clobber registers or exit to a
> * hypervisor. However, it is not universally available.
> *
> * Like all of Linux's memory ordering operations, this is a
> * compiler barrier as well.
> */
>
> What do you think?
I like what I suggested. :)
SERIALIZE is best where available. Do it first, comment it by itself.
Then, go into the long discussion of the other alternatives. They only
make sense when SERIALIZE isn't there, and the logic for selection there
is substantially more complicated.
Powered by blists - more mailing lists