What Adrian Did Next – Part 2 – Sun Microsystems (2022)
adrianco.medium.com
adrianco.medium.com
SPARC exposed read and write access to branch prediction!? That's... fascinating. Here I thought branch prediction was always a completely opaque thing that the CPU did internally and maybe if you were lucky it might let the program be able to know that it was happening after the fact. Hm... I wonder if it's easier to perform Spectre type attacks if you can just ask the CPU about that kind of behavior? No need to do timing attacks if the CPU will just tell you
See for example
https://developer.arm.com/documentation/ddi0595/2020-12/AArc...
but good luck 1. having a cpu with it (can't wait for arm laptops and needing caniuse.org for my assembly code), and 2. figuring out how to use it
Some of the pentium series also had settable branch prediction bias flags.
If you are/can directly hack the pipeline, Adrian better have included that script in the bmark publish. Probably not, because then directors would be calling him at 2am because XYZ corps workload was slow and “could we have your nop script?”
That was an interesting trip down memory lane.
as another commenter mentioned the thing about the branch prediction bit flipping in awk was quite something. the SE Toolkit to monitor kernel perf, which could run for years without issue - was something cool too. the guy who found and fixed a kernel bug offering the biggest performance win in Solaris 8 in the course of writing the first book in a series called Solaris Internals - wow. the description of "the can of worms project" in which they run workloads that look like what customers might use, things that that go beyond typical eng team benchmarks, and the meltdown prevention and heading off of customer issues, it's a great concept from my personal point of view. i appreciated the touching on other more human subjects like the capacity planning DB pricing calculator for customers and the bizdev, relationship, and product design points.
i started off being jealous of what the guy was saying but i was so blown away by everything that i had forgotten that feeling by the end of the article. it was replaced with awe.
I'd rather call the mid-to-late 1990s the "Golden Age" of systems. All on-premises (hence a glut of money going to hardware), more and more business needs for software (and most of it proprietary, with a nice chunk of "professional services" costs on-top to configure & customize). IBM, Oracle, SAP or Microsoft just played that latter game, software/services, with higher stakes and higher wins than Sun, HP/Compaq, Dell etc did for hardware.
What killed Sun wasn't their "party culture". It was their arrogance to believe SPARC the top of the world years after cheap&cheerful x86 had proven itself, and their arrogance to give customers the message "we know best". Sun had more than one chance to pivot to-Linux, or off-hardware, or both, and botched it every time. If you fail to read the market, and refuse to sell customers what they ask for, then no matter your past record, your future looks dull.
No spec, no datasheets, no reliable supply chain, poor ESD, poor cooling. No cooperation between the hardware vendor and the OS vendor. Macs, were they still just making shinier NeXT hw as opposed to lifestyle props, would've been a welcome exception.
Don't even get me started on the senescence of what passes for "commercial Linux". People actually pay RH/IBM for this.
tl;dr: Get off my lawn!