By: dmcq (dmcq.delete@this.fano.co.uk), July 13, 2015 1:14 pm
Room: Moderated Discussions
Linus Torvalds (torvalds.delete@this.linux-foundation.org) on July 13, 2015 1:46 pm wrote:
> dmcq (dmcq.delete@this.fano.co.uk) on July 13, 2015 12:20 pm wrote:
> >
> > You simply don't seem to be able to acknowledge that supporting that is causing more problems,
> > that Linux is part of a feedback loop leading to more buggy programs being produced and your
> > attitude is part of a problem not a solution.
>
> You seem to not be able to understand reality.
>
> First off, Linux actually _works_ on all the broken memory models.When you say that "Linux
> is part of a feedback loop", you're simply wrong, and full of sh*t. Linux is the the most
> portable project I have ever even remotely heard of in reality. We actually do things right.
> Yes, we've had bugs, but we're pretty much the only project out there that does things like
> very fancy lockless algorithms across pretty much every architecture known to man.
>
> Put another way: I know what the f*ck I'm talking about. Weak memory models are
> objectively inferior to stronger ones, and I've given you the reasons for it.
>
> And my claim is that
>
> (a) weak memory ordering doesn't actually buy you anything but confusion and very
> subtle bugs despite (and sometimes due to) more complex code to handle it.
>
> And this is with people who actually understand memory ordering, and write scalable locking,
> and then occasionally get it wrong because the issues are too damn subtle. Code that looks right,
> and works fine in practice, turns out to have really really subtle issues sometimes.
>
> (b) weak memory ordering ends up being a big pain for software because testing is so inconclusive, and
> developers have a super-hard time to see bugs that people with different hardware may trigger easily.
>
> (c) to make matters worse, some particularly crap versions of weak memory ordering also confused
> the hell out of themselves when it came to the serialization. Power really is a complete disaster.
> The difference between lwsync, isync, sync, eieio, and how they actually interact is insane.
>
> (d) weak memory models do not even perform better! It's the one thing that people claim is their
> advantage, and I call BS on that claim. I claim that weak memory models actually perform worse, because
> they end up adding synchronization in places where none is needed, and it would be better to just speculate
> wildly (and in the very unusual case of a conflict, redo the operations in-order).
>
> What part of the above can you not acknowledge? You don't seem to really get that reality is
> tough, and that testing is important, and that bugs happen. You keep living in some fairy land
> where it's ok to say "tough, you shouldn't have bugs, especially in really subtle code that is
> complicated further by the memory ordering making it impossible to test or even think about".
>
> Linus
And I say you're stuck in the past wanting to still code in assembler and bemoaning that the C compiler isn't an assembler. Yes there are loads of tricks in Linux that have had their bugs removed by the all the people falling over them and the innumerable fixes. What I dispute is this insane desire to encourage the same sort of stupid carry on into the future when it is no longer required. Talk about fairly land? Is that the land where everyone who reads about x86 total order and understands its intuitively can automatically write their own new algorithm for lock free programming? How about a better land where they use high level languages which describe what is actually required? If you were around when there was core store you'd be giving reasons why every processor absolutely must support persistent storage for every memory access.
> dmcq (dmcq.delete@this.fano.co.uk) on July 13, 2015 12:20 pm wrote:
> >
> > You simply don't seem to be able to acknowledge that supporting that is causing more problems,
> > that Linux is part of a feedback loop leading to more buggy programs being produced and your
> > attitude is part of a problem not a solution.
>
> You seem to not be able to understand reality.
>
> First off, Linux actually _works_ on all the broken memory models.When you say that "Linux
> is part of a feedback loop", you're simply wrong, and full of sh*t. Linux is the the most
> portable project I have ever even remotely heard of in reality. We actually do things right.
> Yes, we've had bugs, but we're pretty much the only project out there that does things like
> very fancy lockless algorithms across pretty much every architecture known to man.
>
> Put another way: I know what the f*ck I'm talking about. Weak memory models are
> objectively inferior to stronger ones, and I've given you the reasons for it.
>
> And my claim is that
>
> (a) weak memory ordering doesn't actually buy you anything but confusion and very
> subtle bugs despite (and sometimes due to) more complex code to handle it.
>
> And this is with people who actually understand memory ordering, and write scalable locking,
> and then occasionally get it wrong because the issues are too damn subtle. Code that looks right,
> and works fine in practice, turns out to have really really subtle issues sometimes.
>
> (b) weak memory ordering ends up being a big pain for software because testing is so inconclusive, and
> developers have a super-hard time to see bugs that people with different hardware may trigger easily.
>
> (c) to make matters worse, some particularly crap versions of weak memory ordering also confused
> the hell out of themselves when it came to the serialization. Power really is a complete disaster.
> The difference between lwsync, isync, sync, eieio, and how they actually interact is insane.
>
> (d) weak memory models do not even perform better! It's the one thing that people claim is their
> advantage, and I call BS on that claim. I claim that weak memory models actually perform worse, because
> they end up adding synchronization in places where none is needed, and it would be better to just speculate
> wildly (and in the very unusual case of a conflict, redo the operations in-order).
>
> What part of the above can you not acknowledge? You don't seem to really get that reality is
> tough, and that testing is important, and that bugs happen. You keep living in some fairy land
> where it's ok to say "tough, you shouldn't have bugs, especially in really subtle code that is
> complicated further by the memory ordering making it impossible to test or even think about".
>
> Linus
And I say you're stuck in the past wanting to still code in assembler and bemoaning that the C compiler isn't an assembler. Yes there are loads of tricks in Linux that have had their bugs removed by the all the people falling over them and the innumerable fixes. What I dispute is this insane desire to encourage the same sort of stupid carry on into the future when it is no longer required. Talk about fairly land? Is that the land where everyone who reads about x86 total order and understands its intuitively can automatically write their own new algorithm for lock free programming? How about a better land where they use high level languages which describe what is actually required? If you were around when there was core store you'd be giving reasons why every processor absolutely must support persistent storage for every memory access.