lkml.org 
[lkml]   [2020]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] x86/cpu: Use SERIALIZE in sync_core() when available
On Thu, Aug 06, 2020 at 04:08:47PM -0700, Dave Hansen wrote:
> 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.

Sure Dave, I think this layout makes sense. I will rework the comments.

Thanks and BR,
Ricardo

\
 
 \ /
  Last update: 2020-08-07 01:40    [W:0.039 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site