logoalt Hacker News

mgaunard • today at 10:07 AM • 3 replies • view on HN

Isn't it what hyperthreading does by definition? Delaying the thread that shares the same core.

Do they mean they delay it even if suitable execution ports are actually available?


Replies

adrian_b • today at 1:18 PM

Hyperthreading is a marketing term used by Intel instead of its traditional name, which is "Simultaneous Multi-Threading" (SMT).

Th "simultaneous" in the name means that in every clock cycle both threads are running.

The execution units and many other components are shared competitively, e.g. one integer multiplier is occupied in each clock cycle by a multiplication instruction coming from one of the two threads. This will stall the other thread only in the very unlikely event when only multiplication instructions are waiting to be executed and there is no other free integer multiplier.

The description of the bug implies that there are some instructions with a long execution duration, e.g. integer divisions, which stall the other thread even if the other thread is not waiting to execute that kind of instruction, but it could use other execution units.

As noted in TFA, there are no details about which are the circumstances when this can happen.

In any case, according to the description this is a benign bug, because its only effect should be that a program may be slower than expected, though probably with a specially crafted program the effect could be great. For instance, assuming that the offending instruction is an integer division, perhaps with a special program containing a long string of divisions you could block completely the progress of another process that is executed on the same core.

mrklol • today at 10:22 AM

Afaik, no. Should be using the idle ports which is rarely not the case. And if that is delayed / blocked it’s getting way slower.

ajasmin • today at 12:11 PM

That is my rough understanding as well i.e. hyperthreading is feeding the execution pipeline from two threads so as to more effectively use the ALU.

I would have tough it normal that one thread can stale another...