lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter
Date
From: Andy Lutomirski
> Sent: 12 December 2019 16:02
...
> MFENCE also implies LFENCE, and LFENCE is fairly slow despite having no architectural semantics other than blocking speculative
> execution. AFAICT, in the absence of side channels timing oddities, there is no code whatsoever that would be correct with LFENCE
> but incorrect without it. “Serialization” is, to some extent, a weaker example of this — MOV to CR2 is *much* slower than MFENCE or
> LOCK despite the fact that, as far as the memory model is concerned, it doesn’t do a whole lot more.

IIRC LFENCE does affect things when you are mixing non-temporal and/or write-combining
memory accesses.

I also thought there was a case where you needed to stop the speculative reads.
But can't remember why.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2019-12-12 17:23    [W:1.887 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site