By: Linus Torvalds (torvalds.delete@this.linux-foundation.org), April 9, 2021 9:44 am
Room: Moderated Discussions
dmcq (dmcq.delete@this.fano.co.uk) on April 9, 2021 2:25 am wrote:
> --- (---.delete@this.redheron.com) on April 8, 2021 8:30 pm wrote:
> > Andrey (andrey.semashev.delete@this.gmail.com) on April 8, 2021 3:50 am wrote:
> ...
> > https://www.inf.ufpr.br/aldri/ci212/artigos/ISCA2013/p225-cain.pdf
> ...
>
> Thanks for the link, I'd missed that the suspend facility could be used for a number of other things besides
> what I'd thought of.
Ugh, the powerpc transaction suspend thing is one of the most horrible things ever.
I'm happy it's gone, gone, gone.
It's a classic case of over-design, and it was afaik the immediate cause of the power9 bugs.
Even Intel didn't make that horrible mistake. It comes from the POWER people really trying to push transaction sizes past reasonable boundaries.
The way to handle a page fault inside a transaction is the exact same way that you handle a page fault inside a single instruction. You take the page fault, and you restart the whole thing. You do not do some "save off half-way state" crap.
Christ, don't people remember the horrible mistake that was the Motorola 68020? What power9 does with their crazy suspended transactions is very similar to what the 68020 did for page faults: saving random internal microcode state on the fault stack. It's very nearly exactly the same thing, except now that "internal microcode state" is "internal transaction state" instead.
And the whole "forward process" argument is garbage, for the same reason it's garbage for single instructions. If you get external interrupts so often that you can't make forward progress, you have bigger issues than the transaction. In fact, you have a fundamental design mistake in allowing transactions that big.
The whole push for huge transactions is a big big mistake. The whole "we need to save partial state" is just one symptom of the problems with the whole approach. And it was a big enough mistake to apparently kill HTM entirely on the POWER side.
Good effing riddance.
The POWER9 HTM makes Intel TSX look positively sane.
Linus
> --- (---.delete@this.redheron.com) on April 8, 2021 8:30 pm wrote:
> > Andrey (andrey.semashev.delete@this.gmail.com) on April 8, 2021 3:50 am wrote:
> ...
> > https://www.inf.ufpr.br/aldri/ci212/artigos/ISCA2013/p225-cain.pdf
> ...
>
> Thanks for the link, I'd missed that the suspend facility could be used for a number of other things besides
> what I'd thought of.
Ugh, the powerpc transaction suspend thing is one of the most horrible things ever.
I'm happy it's gone, gone, gone.
It's a classic case of over-design, and it was afaik the immediate cause of the power9 bugs.
Even Intel didn't make that horrible mistake. It comes from the POWER people really trying to push transaction sizes past reasonable boundaries.
The way to handle a page fault inside a transaction is the exact same way that you handle a page fault inside a single instruction. You take the page fault, and you restart the whole thing. You do not do some "save off half-way state" crap.
Christ, don't people remember the horrible mistake that was the Motorola 68020? What power9 does with their crazy suspended transactions is very similar to what the 68020 did for page faults: saving random internal microcode state on the fault stack. It's very nearly exactly the same thing, except now that "internal microcode state" is "internal transaction state" instead.
And the whole "forward process" argument is garbage, for the same reason it's garbage for single instructions. If you get external interrupts so often that you can't make forward progress, you have bigger issues than the transaction. In fact, you have a fundamental design mistake in allowing transactions that big.
The whole push for huge transactions is a big big mistake. The whole "we need to save partial state" is just one symptom of the problems with the whole approach. And it was a big enough mistake to apparently kill HTM entirely on the POWER side.
Good effing riddance.
The POWER9 HTM makes Intel TSX look positively sane.
Linus