lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/18] seqcount: Introduce raw_write_seqcount_barrier()
On Wed, Jun 17, 2015 at 09:37:31AM -0700, Paul E. McKenney wrote:
> The point of std::atomic<> (and of the equivalent C11 syntax) is to
> force the compiler to suppress optimizations that are unsafe for shared
> variables. We get more or less the same effect with volatile, protests
> from compiler people notwithstanding.
>
> I often tell the compiler guys that they have to expect make -some-
> concessions for being 30 years late to the concurrency party, but
> it nevertheless makes sense to future-proof our code where it is
> reasonable to do so.

Right, so in that regards I would request the compiler option (and or
#pragma) that disables all the out-of-thin-air nonsense.

Because while they hide behind their undefined behaviour, the fact is
that all of their machines for the past 30 odd years have been relying
on this 'undefined' behaviour to work. This being the machines they've
been typing their useless specs on :-)

I doubt there's a single OS kernel (that supports SMP configurations)
that does not rely on a whole host of 'undefined' behaviour.


\
 
 \ /
  Last update: 2015-06-17 19:41    [W:0.106 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site