Messages in this thread | | | Date | Sun, 9 Feb 2014 16:56:26 -0800 | Subject | Re: [RFC][PATCH 0/5] arch: atomic rework | From | Linus Torvalds <> |
| |
On Sun, Feb 9, 2014 at 4:27 PM, Torvald Riegel <triegel@redhat.com> wrote: > > I wouldn't characterize the situation like this (although I can't speak > for others, obviously). IMHO, it's perfectly fine on sequential / > non-synchronizing code, because we know the difference isn't observable > by a correct program.
What BS is that? If you use an "atomic_store_explicit()", by definition you're either
(a) f*cking insane (b) not doing sequential non-synchronizing code
and a compiler that assumes that the programmer is insane may actually be correct more often than not, but it's still a shit compiler. Agreed?
So I don't see how any sane person can say that speculative writes are ok. They are clearly not ok.
Speculative stores are a bad idea in general. They are completely invalid for anything that says "atomic". This is not even worth discussing.
Linus
| |