* Peter Zijlstra <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to