The CPU architectural question of what is a (reserved) NOP
I recently wrote about an instruction oddity in the PowerPC 64-bitarchitecture , where a number of or instructions with no effects were reused to signal hardware thread priorityto the CPU. This came up when Go accidentally used one of thoseinstructions for its own purposes and accidentally lowered thepriority of the hardware thread.One of the reactions I've seen has been a suggestion that peopleshould consider all unofficial NOPs (ie, NOPs other than theofficially documented ones) to be reserved by the architecture.However,
I should assume contexts aren't retained in Go APIs
Over on the Fediverse, I said something about some Go APIs I'd runinto :
Dear everyone making Go APIs that take a context argument and returnsomething you use to make further API calls (as methods): please, Ibeg you, document the scope of the context. Does it apply to only theinitial setup API call? Does it apply to all further API calls throughthe object your setup function returned? I don't want to have to readyour code to find this out. (
Some thoughts on whether and when TRIM'ing ZFS pools is useful
Now that I've worked out how to safely discard (TRIM) unused diskblocks in ZFS pools , I can thinkabout if and when it's useful or important to actually do this. Intheory, explicitly discarding disk blocks on SSDs speeds up theirwrite performance because it givesthe SSD more unused flash storage space it can pre-erase so thespace is ready to be written into. So the first observation is thathow much TRIM'ing a pool matters depends on how much you're writing
Some notes on using using TRIM on SSDs with ZFS on Linux
One of the things you can do to keep your SSDs performing well overtime is to explicitly discard ('TRIM') disk blocks that arecurrently unused . ZFS on Linux has support for TRIM commands for some time; thedevelopment version got it in 2019, and it first appeared in ZoL0.8.0 . Whenit was new, I was a bit nervous about using it immediately , but it's been years since then and recently Idid some experimentation with it. Well,
You should back up the settings for your Firefox addons periodically
Today I had some unexpected excitement with two of mycore Firefox addons in my core browser, where either or both ofuBlock Origin and uMatrix apparently stopped working and stoppedeverything else from working along with them, since they're on thecritical path for getting web pages. I eventually got everythingworking again, but I wound up needing to remove and then reinstallfrom scratch uBlock Origin and uMatrix, both of which have complexconfigurations. This is where I discovered that my most recentbackups of those settings were from 2
Linux software RAID mirrors, booting, mdadm.conf, and disk counts for non-fun
Linux software RAID mirrors have a count of the number of activedisks that are in the array; this is what is set or changed by mdadm 's--raid-devices argument. Your mdadm.conf may alsolist how many active disks an array is supposed to have, in the'num-devices=' setting (aka a 'tag') for a particular array. The mdadm.conf manual page dryly describes this as "[a]s with level= this is mainly for compatibility with
I should always make a checklist for anything complicated
Today I did some work on the disk setup of my home desktop and Igot shot in the foot ,because when you remove disks from Linux software RAID arrays andthen reboot, the boot process may reassemble those RAID arrays usingthe disks you removed (or even just one disk), instead of the actuallive disks in the RAID array. There are a number of reasons thatthis happened to me, but one of them is that I didn't make achecklist for what I was doing and instead did
How Let's Encrypt accounts are linked to your certificates in Certbot
If life is simple, every machine you run will have its own Let'sEncrypt account and you'll never do thingslike copy or move a TLS certificate (and possibly much or all of/etc/letsencrypt) from one machine to another. If you do wind upmoving LE TLS certificates and perhaps all of Certbot's /etc/letsencrypt,you can wind up with shared Let's Encrypt accounts or strandedTLS certificates , and you maywant to straighten this out. Certbot doesn't
How Prometheus makes good use of the HTTP Accept: header
Over on the Fediverse, Simon Willison asked if the HTTP Accept:header was a good idea , whichhe later narrowed down to APIs and HTML content , excludingmedia (video, images, etc). I realized that I knew of a good examplefor APIs, which is how Prometheus metrics exporters use Acceptto determine what format they'll report metrics in (although it turnsout that I was a bit wrong in my Fediverse post).
Prometheus metrics exporters are queried ('scraped') by Prometheus and
An instruction oddity in the ppc64 (PowerPC 64-bit) architecture
Over on the Fediverse, I reported my discovery of a ppc64 oddity :
TIL that the ppc64 (PowerPC 64-bit) architecture overloads 'orr1,r1,r1' (and the same using all r6 or r2) to change the (hardware)priority of your thread. This came up in a Go code generation issue,and Raymond Chen mentioned it in passing in 2018.