Threadripper L3 CPUID Strangeness: Difference between revisions
No edit summary |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 24: | Line 24: | ||
</tt> | </tt> | ||
and to a great deal of misery and frustration, and daydreams of becoming a stripper because you sure as shit don't want to be a programmer. writing this is about as fun as bobbing for apples in an skinsearing hot metal washbucket of curdling possum smeg. every time a new [[Architecture|microarchitecture]] employed a different cache size, thus mandating a new [[CPUID]] number, your discovery failed. in fact, my very first PR at GOOG was to add descriptors for whatever rhodium-crusted CapEx-demolishing Xeons we were fielding, as apparently 70,000 engineers had until then been content to just read "Couldn't discover cache size for processor type FOO!" twice in their logs every time they ran a binary before bitching on ''eng-misc'' for six hours or [https://www.nytimes.com/2021/01/04/ | and to a great deal of misery and frustration, and daydreams of becoming a stripper because you sure as shit don't want to be a programmer. writing this is about as fun as bobbing for apples in an skinsearing hot metal washbucket of curdling possum smeg. every time a new [[Architecture|microarchitecture]] employed a different cache size, thus mandating a new [[CPUID]] number, your discovery failed. in fact, my very first PR at GOOG was to add descriptors for whatever rhodium-crusted CapEx-demolishing Xeons we were fielding, as apparently 70,000 engineers had until then been content to just read "Couldn't discover cache size for processor type FOO!" twice in their logs every time they ran a binary before bitching on ''eng-misc'' for six hours or [https://www.nytimes.com/2021/01/04/opinion/google-union.html cosplaying a union]. perhaps it was lost in the 400KB of messages about your 1.4GB HelloWorld <tt>go</tt> binary failing to elect a [https://en.wikipedia.org/wiki/Paxos_(computer_science) paxos] leader. google-sized problems, baybee! | ||
thankfully, Blue and Red Teams comutually unfucked themselves late in the aughts, or unfucked in any case this small fuckgrove, and introduced more sensibly-structured CPUID results. [https://www.amd.com/system/files/TechDocs/25481.pdf AMD provides] CPUID leaf 0x80000006, "L2/L3 Cache and TLB Identification". The EDX register returns "L3 Cache Identifiers", structured thusly: | thankfully, Blue and Red Teams comutually unfucked themselves late in the aughts, or unfucked in any case this small fuckgrove, and introduced more sensibly-structured CPUID results. [https://www.amd.com/system/files/TechDocs/25481.pdf AMD provides] CPUID leaf 0x80000006, "L2/L3 Cache and TLB Identification". The EDX register returns "L3 Cache Identifiers", structured thusly: | ||
| Line 69: | Line 69: | ||
</pre> | </pre> | ||
dogs fucked the Pope; no fault of mine! now hardware architects can do some very strange things, and indeed I saw an Intel i7 of the broadwell era with a twice-cursed 6-way TLB, and the 96KB L2 of the Alpha 21164 was famously ''associativé à trois'', as befitted the carefree California culture of the mid-90s. tupac was still alive (doing 187s), big pete wilson was governing (proposing 187s), and the homeless were conveniently hidden behind piles of AOL install media (each man, woman, and child on earth had approximately 187 AOL cds). I once mailed Yale Patt about the 3-way associativity, and he responded with twelve pages of baseball stats descending into a challenge of pistols at dawn. "ps I'll predict your branches you brain-dead ass-eyed Atlanta son of a bitch pps send nudes" but i digress. anyway, however (justifiably) [https://media1.tenor.com/images/a6a9150a7d8fd5a7cbbd0112a641c4d1/tenor.gif?itemid=14477035 drunk with dankness] the AMD boys are, i very much doubt Dr. Lisa "the Su is for Superwoman" Su is letting enneadic caches out the door. | [[File:Wallofaol.jpg|thumb|right|sometimes you got a magazine and it was just AOL cds]] | ||
dogs fucked the Pope; no fault of mine! now hardware architects can do some very strange things, and indeed I saw an Intel i7 of the broadwell era with a twice-cursed 6-way TLB, and the 96KB L2 of the Alpha 21164 was famously ''associativé à trois'', as befitted the carefree California culture of the mid-90s. tupac was still alive ([https://en.wikipedia.org/wiki/187_(slang) doing 187s]), big pete wilson was governing ([https://en.wikipedia.org/wiki/1994_California_Proposition_187 proposing 187s]), and the homeless were conveniently hidden behind piles of AOL install media (each man, woman, and child on earth had approximately 187 AOL cds). I once mailed Yale Patt about the 3-way associativity, and he responded with twelve pages of baseball stats descending into a challenge of pistols at dawn. "ps I'll predict your branches you brain-dead ass-eyed Atlanta son of a bitch pps send nudes" but i digress. anyway, however (justifiably) [https://media1.tenor.com/images/a6a9150a7d8fd5a7cbbd0112a641c4d1/tenor.gif?itemid=14477035 drunk with dankness] the AMD boys are, i very much doubt Dr. Lisa "the Su is for Superwoman" Su is letting enneadic caches out the door. | |||
so...what's goin' on here? i've gotta get back to profitable work for the moment, but watch this space for the inevitable solution. hack on! | so...what's goin' on here? i've gotta get back to profitable work for the moment, but watch this space for the inevitable solution. hack on! | ||
| Line 93: | Line 94: | ||
</pre> | </pre> | ||
one must issue a 0x80000000 ExtendedMaxSupport leaf request, and if 0x8000001D ExtendedCacheProperties is available, that ought be used (it also seems necessary to execute 0x80000001 FeatureExtId and check for the TopologyExtensions bit (0x0x400000) in ECX). iterate on the leaf until EAX returns 0. this is actually a nice upgrade in functionality, especially as you can now detect sharing of caches among cores, inclusivity/exclusivity, and whether WBINVD or INVD is in use. | |||
happy day! time to drink the bathroom cleaner! | happy day! time to drink the bathroom cleaner! | ||