Apple's version of hyperthreading on Apple Sillcon

exoticspice1

Site Champ
Posts
298
Reaction score
101
Can Apple add it to later SoCs or ARM can't use Hyperthreading or SMT like x86 chips?

Is hyperthreading even useful?
 

Cmaier

Site Master
Staff Member
Site Donor
Posts
5,215
Reaction score
8,264
Can Apple add it to later SoCs or ARM can't use Hyperthreading or SMT like x86 chips?

Is hyperthreading even useful?

Apple could add it in the future if they want to, but given their current microarchitecture it’s not likely to be very useful. Hyperthreading is most useful when you can’t decode and issue enough instructions per cycle to keep the compute hardware (the ALUs) busy. M1/M2 appear to be very successful at keeping these compute pipelines full. As a result, SMT would mostly result in interrupting one thread to swap to another. On x86, where instruction decode is much more complicated, it is harder to keep the pipelines full because you don’t even know for sure how many instructions you have fetched each cycle. SMT can be more beneficial in these cases because it allows you to keep the pipelines full with work from another thread.

Generally speaking I would expect SMT to help a little even on Apple’s ARM designs, but the hardware and engineering costs may not be worth the trouble. SMT adds problems like susceptibility to additional side channel attacks, adds power consumption, etc.
 

mr_roboto

Site Champ
Posts
272
Reaction score
432
Don't tell MR members. They believe there is a distinction between turbo boost and throttling. One is good, the other is very, very bad.
In Intel's world there actually is a distinction, and one is in fact good and the other very, very bad. The problem is that the forums experts are trying to map their vague understanding of a context-dependent truth to a different system, and failing at understanding the limits of their knowledge.

In Intel technical docs, "turbo boost" is generally what the engineering world refers to as dynamic voltage and frequency scaling, or DVFS - a feedback loop varies V and F on the fly to keep power and/or temperature under target values. This is what maps most closely to MacBook Air "throttling".

Intel "throttling", on the other hand, is emergency measures. Throttling is what an Intel chip does to prevent severe overtemps, or avoid damaging motherboard VRMs if they're complaining about running in excess of their rated current. There's two kinds of throttling response. One is simply pulling clocks (and voltages) all the way down to minimums otherwise seen only in idle states (usually about 800 MHz iirc). However, since that takes nonzero time (voltages can't slew immediately), another common Intel emergency measure is gating dispatch rate, making the processor immediately downgrade itself way below 1 instruction per clock.

So, Intel throttling actually is super bad, and in a well engineered system, you should essentially never experience it. The only worse thing which can happen is a forced shutdown (which will happen if even throttling fails to get things under control).
 

theorist9

Site Champ
Posts
603
Reaction score
548
Intel "throttling", on the other hand, is emergency measures. Throttling is what an Intel chip does to prevent severe overtemps, or avoid damaging motherboard VRMs if they're complaining about running in excess of their rated current. There's two kinds of throttling response. One is simply pulling clocks (and voltages) all the way down to minimums otherwise seen only in idle states (usually about 800 MHz iirc). However, since that takes nonzero time (voltages can't slew immediately), another common Intel emergency measure is gating dispatch rate, making the processor immediately downgrade itself way below 1 instruction per clock.

So, Intel throttling actually is super bad, and in a well engineered system, you should essentially never experience it. The only worse thing which can happen is a forced shutdown (which will happen if even throttling fails to get things under control).
I regularly experienced what you called 'Intel throttling' on both my 2011 and 2014 15" MBP's whenever the room temp got into the low 80's. My laptops were on a raised aluminum stand (Rain Design mStand, https://www.raindesigninc.com/mstand.html), so they were well-ventiated.

In both laptops, the OS would create a phantom high-load kernel task. I believe this didn't actually use the CPU, and that its purpose was to instead simply block off capacity so it couldn't be used by real processes, i.e., that it directed the scheduler to act as if most of the processing capacity was unavailable. Here's a screenshot from the 2014 MBP when it was happening:
1658987357781.png


In addition, as you said, the CPU speed was slowed to 800 MHz (screenshot taken during same throttling event as above).

Thus between blocking off most of the processing cores (I think), and slowing the speeds of all cores to 800 MHz, all real processing on the CPU was slowed to a crawl (e.g., ~30 sec between when I pressed the keys to call up the force quit menu and when it opened).

1658987725167.png



My laptops were always connected to an external monitor, so the dGPU was always running, and my guess is that the throttling was due to dGPU overheating—especially since the CPU temperature wasn't very high; plus disconnecting the external monitor, which would cause the system to switch to the integrated GPU, would eliminate the throttling after about a minute. [Or I could keep the monitor connected, but aim a desk fan on high at the back of the laptop; this would also eliminate the throttling after about a minute.]

I forget the repair history with the 2011, but with the 2014 the problem appeared a couple of years after purchase, and Apple replaced the motherboard, but the throttling returned after a year. My guess is that there was a problem with the stability or application of the thermal paste. After the 2nd replacement, I had no further problems, so I guess Apple (or their repair center) found a better quality thermal paste (or a better way to apply it).
 

Attachments

  • 1658987720249.png
    1658987720249.png
    15.2 KB · Views: 21
Last edited:

thekev

Elite Member
Posts
1,110
Reaction score
1,674
Hyperthreading suggests that they're scheduling 2 threads of execution on one physical core. If you can fill your pipeline without such measures, why would you ever want to use it?
 

Yoused

up
Posts
5,511
Reaction score
8,687
Location
knee deep in the road apples of the 4 horsemen
I wonder about what would have happened if AMD had abandoned the Opteron project in the late '90s to focus more on other products. Intel was intent on going all in with Itanic and had no back-up plan to deal with its duddiness. PPC was the only other mainstream 64-bit processor at the time. How long would it have taken Intel to get something practical going? Could mips or sparc have become viable?
 

Cmaier

Site Master
Staff Member
Site Donor
Posts
5,215
Reaction score
8,264
I wonder about what would have happened if AMD had abandoned the Opteron project in the late '90s to focus more on other products. Intel was intent on going all in with Itanic and had no back-up plan to deal with its duddiness. PPC was the only other mainstream 64-bit processor at the time. How long would it have taken Intel to get something practical going? Could mips or sparc have become viable?
What else other than opteron would we have worked on? I mean, the *original* K8 was a whole other thing, but we had no choice but to do what became Opteron because almost the entire design team resigned and what you had left were around 15-20 folks between circuit design, logic design, and architecture. And even Opteron (which we called sledgehammer) almost didn’t happen - there was a dinner at La Papillon that ended in a vote. The alternative was we go work elsewhere.

As for SPARC, it *was* viable around that time, but Sun really couldn’t keep it going because, frankly, their design team was fucked up. I can say that, because I worked there in 1997. And after two months I couldn’t take any more of the fucked-up-ness and left for AMD. I don’t blame the designers themselves, but the management was the worst. Some of us made efforts to fix things, but it was just too much to fix, and it got frustrating hearing “we know what we’re doing. We did ultrasparc I” over and over. It’s also important to remember that while some others were also doing SPARC, it wasn’t going to go far when even Sun wasn’t fully in on it. They were trying to get something called “ultra Java” going, though the only thing I remember about that was telling one of the people interviewing me that if the job involved ultrajava I was not interested.

MIPS was also viable, and their designers seemed to be better, but they had other problems. As usual, I have a MIPS story. I interviewed at silicon graphics at the same time I interviewed at Sun and a few other companies (when Exponential Technology went out of business). They were using Compass design tools, which was a very esoteric design tool that I never ran across anyplace else in the industry. EXCEPT - I was an expert in using it, because we used it at RPI in my Ph.D research program for DARPA, and I was the one responsible for administering the tool. So I am at this interview, and as far as I can tell I was doing pretty well. Then I get to this interview where a guy shows me a layout for a logic gate on the screen and asks me what it is. There are a couple problems with this - first, different companies use different colors to represent different layers. Second, I’m red/green colorblind. So I’m looking at it, and I can tell it’s either a multiplexor or an xor gate of some sort. These gates are really the same, but vary in functionality just a bit depending on where the metal connects. I tell him it’s one of those but I can’t quite figure out where all the connections are because I can’t distinguish one of the metal layers from polysilicon because of color blindness. So I start editing the configuration on his workstation to change the colors so I can see the freaking circuit. The dude goes crazy and essentially throws me out of his office. The next day I get a long voice mail from the manager, explaining why they can’t hire me because I wouldn’t be able to “keep up.” He runs out of time on my answering machine, and calls back and leaves a second message explaining in more detail why I suck because I touched the workstation.

Those guys are lucky I hadn’t gone to law school by that point :)

Anyway, what would have happened if Opteron wasn’t a thing? Well, either Merced/Itanium would have succeeded, for lack of alternative, OR PowerPC/Power would have succeeded, or maybe AMD would have done something else that would have pulled the industry along (there is some possibility it could have been ARM - it would have HAD to have been some form of RISC since we didn’t have manpower to do something huge. But whatever it would have been would have required Microsoft’s buy-in. That is often overlooked - we would never have done Opteron if Microsoft didn’t agree to put Windows on it.)
 

mr_roboto

Site Champ
Posts
272
Reaction score
432
The dude goes crazy and essentially throws me out of his office. The next day I get a long voice mail from the manager, explaining why they can’t hire me because I wouldn’t be able to “keep up.” He runs out of time on my answering machine, and calls back and leaves a second message explaining in more detail why I suck because I touched the workstation.

Those guys are lucky I hadn’t gone to law school by that point :)

Well that tale didn't end quite the way I expected! Boo on the guy for going nuts just because you attempted to do what you needed to bullshit gotcha question, and on his manager for not seeing through it. And, y'know, if you like other things about a candidate and they demonstrate in front of your eyes that they won't need much training on your weird CAD software almost nobody else uses... hire them???

I worked with an ex-MIPS/SGI guy once. He told me the tapeout parties were... rowdy. Carpets ruined by getting soaked in alcohol levels of rowdy. :)

Anyway, what would have happened if Opteron wasn’t a thing? Well, either Merced/Itanium would have succeeded, for lack of alternative, OR PowerPC/Power would have succeeded, or maybe AMD would have done something else that would have pulled the industry along (there is some possibility it could have been ARM - it would have HAD to have been some form of RISC since we didn’t have manpower to do something huge. But whatever it would have been would have required Microsoft’s buy-in. That is often overlooked - we would never have done Opteron if Microsoft didn’t agree to put Windows on it.)
I suspect the actual boring answer would've been something like:

* Itanium is the same slow-mo disaster, gets captive HP big iron customers and struggles with everyone else

* PowerPC is the same disappointment thanks to the same tensions between the A-I-M triumvirate and the joint design center's terrible technical management.

(I've heard before that the team working on the high performance workstation CPUs wasn't allowed to use high speed offchip L2 cache, during the era when that was absolutely essential. Meanwhile the low end CPU team was allowed to do it. That's how we got the 750 (aka G3) massively outperforming the 604 even though the 750 was supposed to be the followup to the 603 - a small, lightweight, and power efficient CPU for laptops and low end desktops.)

* Intel is eventually forced by market pressures to make a 64-bit x86
 

Cmaier

Site Master
Staff Member
Site Donor
Posts
5,215
Reaction score
8,264
The real Turbo Boost was that button on the front of the PC...?
The pc I bought for college had one of those. Was made by a company called AST. Can’t remember how fast, but probably something like 16 MHz or less.
 

DT

I am so Smart! S-M-R-T!
Posts
6,405
Reaction score
10,455
Location
Moe's
Main Camera
iPhone
The pc I bought for college had one of those. Was made by a company called AST. Can’t remember how fast, but probably something like 16 MHz or less.

Oh yeah, probably the AST Premium/286 :D We sold those as our "premium brand" at the computer store where I worked. Really nicely put together machines, beefy case, easily accessed components, a good factory backed warranty (only sold through authorized dealers). I even remember the first one I installed was at Georgia-Pacific for one of their mechanical engineers (they actually manufacture paper related products).

Before that we sold the holy heck out of their Six Pack Plus expansion card.

They did really well, until the no-name clones took over the PC space and they didn't predict or flow with the low end market, and they got creamed.
 

Cmaier

Site Master
Staff Member
Site Donor
Posts
5,215
Reaction score
8,264
Oh yeah, probably the AST Premium/286 :D We sold those as our "premium brand" at the computer store where I worked. Really nicely put together machines, beefy case, easily accessed components, a good factory backed warranty (only sold through authorized dealers). I even remember the first one I installed was at Georgia-Pacific for one of their mechanical engineers (they actually manufacture paper related products).

Before that we sold the holy heck out of their Six Pack Plus expansion card.

They did really well, until the no-name clones took over the PC space and they didn't predict or flow with the low end market, and they got creamed.
Pretty sure mine was a 386. Built a little breadboard thing so me and my roommate could “network” our machines using the rs232 port. I remember coding in turbo pascal for a lumped parameters class on that thing, and using it to access the campus mainframe. Don’t recall what happened to it or when I replaced it. Don’t even remember what I replaced it with. I think I may have bought it on CDW? I recall I definitely bought RAM for it on CDW and it was crazy expensive.
 

throAU

Site Champ
Posts
253
Reaction score
273
Location
Perth, Western Australia
Don't tell MR members. They believe there is a distinction between turbo boost and throttling. One is good, the other is very, very bad.

Lol tell me about it.

Ice lake runs at 1.2 Ghz (Never mind I saw my 2020 Air struggle to keep above that at times) and boosts to 3.6 and its all good
M2 runs at 3ghz + even when "throttled" and the sky is falling.
 

throAU

Site Champ
Posts
253
Reaction score
273
Location
Perth, Western Australia
Well that tale didn't end quite the way I expected! Boo on the guy for going nuts just because you attempted to do what you needed to bullshit gotcha question, and on his manager for not seeing through it. And, y'know, if you like other things about a candidate and they demonstrate in front of your eyes that they won't need much training on your weird CAD software almost nobody else uses... hire them???

People seem to forget sometimes that the interview process is as much about determining whether YOU even want the job, as it is about the employer deciding whether to hire you.
 

jbailey

Power User
Posts
164
Reaction score
180
People seem to forget sometimes that the interview process is as much about determining whether YOU even want the job, as it is about the employer deciding whether to hire you.
I usually work under contract so it is pretty rare that if someone is willing to pay my rate that I don't want the job. Mercenary.
 
Top Bottom
1 2