The only reason I hesitated to turn off the hypervisor and uninstall Hyper-V in order to have VirtualBox run properly was that I really like the integration of WSL v2 (Windows Subsystem for Linux) and it's nice to have a bash shell in a Terminal tab intermixed with PowerShell. I really like how Microsoft got X11 and Linux audio working with no configuration, so I can run the Linux version of Visual Code to edit files inside my Linux /home partition. I use WSL daily at work for Yocto Linux dev.
Notices by Jake Hamby (jhamby@chaos.social), page 2
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:57 JST Jake Hamby -
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:56 JST Jake Hamby It's fun that there's no noticeable overhead from running Ubuntu or Gentoo in VirtualBox, in WSL, or on bare metal, except for the suboptimal VirtualBox-on-Hyper-V case.
Anyway, Gentoo, I just discovered "-march=native" doesn't seem to be the best choice for AMD CPUs. At least according to Rust's "rustc -C target-cpu=help", LLVM seems to think it's a generic x86-64 but not anything specific". GCC's flags passed to cc1plus indicate it's enabling MMX, SSE, AVX, etc. as individual feature flags.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:54 JST Jake Hamby So I think both GCC and Clang/Rust are able to generate code that enables all the supported SIMD features with "-march=native", but are they able to optimize code scheduling for the microarchitecture or not? I'm doubtful.
So I changed the compiler flags to "-march=znver3" ("-C target-cpu=znver3" for Rust) in /etc/portage/make.conf to ensure it's generating code for Zen 3 (actually Zen 3+, but code scheduling is the same).
Gentoo really makes me ponder optimizing packages for many CPU types.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:53 JST Jake Hamby Gentoo also makes me think about combinatorial explosion of configuration options. Even if we restrict to 64-bit x86, there's glibc vs. musl libc, systemd vs. OpenRC, desktop vs. non-desktop, GNOME vs. KDE vs. Xfce, system hardening, and that's without getting into all the USE flags you can toggle individually.
Fortunately, Gentoo provides a stage3 to start with configured with systemd and desktop, so I got Rust, GCC, GTK 3, etc. prebuilt and only needed to add Xfce and some Xorg meta packages.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:52 JST Jake Hamby A few years ago, I was really interested in making a user-friendly desktop Linux to make 1996-2006 era non-x86 PCs usable as Internet terminals and for LibreOffice, etc.. There are plenty of PowerMacs floating around, but ideally you want to have separate builds for G3, G4, and G5. Does it matter enough that there are two variants of the G4 (7400 and 7450) to build two different sets of binaries for G4 and G4+? G3 doesn't have AltiVec, that's a big difference and incompatibility vs. later PPCs.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:51 JST Jake Hamby For DEC Alpha, you'd want at minimum two versions of all compiled code since the byte-word extension isn't present in the earlier Alphas, and they need multiple instructions to load/save bytes and 16-bit words compared to later Alphas with BWX support (or other CPUs).
32-bit SPARC didn't ship with multiply/divide instructions, added later (SPARC V8). Any type of SIMD or math extension is going to make it worthwhile to compile the code both ways, perhaps in the same binary to select at runtime.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:50 JST Jake Hamby Don't get me started on PowerPC after Apple. IBM has added so many new instructions in each new POWER version that today's ports of popular open-source code that generates code or needs to be bootstrapped from binaries (Node.js, Rust, Go, etc.) are often compiled to, or generate code requiring instructions that aren't in a G5's CPU. It's 64-bit PowerPC, circa 2004.
Not to mention that Linux on PowerPC decided to switch to little-endian because big-endian is such a giant code porting headache.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:49 JST Jake Hamby The G5 CPU can't run in little-endian mode. It may be the only PowerPC CPU that isn't bi-endian. Apple didn't need little-endian support but they did need some other obscure compatibility features not found in other PowerPC chips (there's a "zero a cache line" opcode that Mac code expected to zero a certain # of bytes, so G5's emulate zeroing that # of bytes, which is now smaller than a cache line, which other PowerPC's don't, a compatibility feature only needed to run 32-bit Mac PowerPC code).
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Wednesday, 01-Jan-2025 07:02:47 JST Jake Hamby The QEMU/KVM hypervisor on PowerPC/POWER is quite clever. First of all, the fact that it works at all on G3/G4/G5/PS3/etc. CPUs that don't even have a hypervisor mode is kind of amazing. It's called "KVM-PS" (for "problem state", the IBM term for "user mode"), vs. "KVM-HV" for the kernel module that uses a real hypervisor.
The PPC KVM module knows how to trap and emulate the "zero a cache line" instruction, which is how you can run old versions of MacOS 9 or X on a recent POWER9 or whatever.
-
Embed this notice
Jake Hamby (jhamby@chaos.social)'s status on Sunday, 14-May-2023 11:43:07 JST Jake Hamby I don't plan to start using Mastodon much any time soon, but I did want to log in to post to any and all of my friends from Twitter: I deleted my Twitter account without much advance notice because the CEO of the company is a literal Nazi.
Let me say the same thing a second time: Elon Musk's ideology is indistinguishable from Nazi ideology, period, full stop. Elon Musk believes in everything that Himmler did, and I couldn't deny that fact to myself any longer.