lkml.org 
[lkml]   [2015]   [Jun]   [18]   [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()

* Peter Zijlstra <peterz@infradead.org> wrote:

> > > I doubt there's a single OS kernel (that supports SMP configurations) that
> > > does not rely on a whole host of 'undefined' behaviour.
> >
> > An alternative approach would be a compiler switch (or similar) that changed
> > the default atomic access from SC to relaxed. Then shared variables could be
> > marked atomic, and normal C code could be used to access them, but without the
> > compiler emitting memory barriers all over the place (yes, even on x86).
>
> See, I don;'t think that is a realistic approach. Who is going to audit our ~16
> million lines of code to mark all shared variables? Or all the other existing
> code bases that rely on this behaviour?

Sidenote: we are well beyond 19 million lines meanwhile.

But generating speculative writes unless the compiler can prove it's not shared
memory are crazy. Who on earth argues they are sane?

In what retarded use-case do unasked for speculative writes even make any sense
beyond as a sadistic tool to make parallel, threaded code even more fragile??

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-06-18 12:01    [W:0.074 / U:1.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site