But for what we traditionally think of as swapping - sending it all the way out to a disk - I tend to doubt there's any meaningful way to add HW accel.
That’s actually related to why the page size change matters, though.
The throughput of SSDs when doing small transactions is more bound by the number of IO operations per second. So doing them in larger chunks helps a lot here. But even then, 16KB throughput to the M1 SSD is more than 4x that of the 4KB throughput. So there’s some additional perf gain on top. A 16KB transaction is simply less expensive than a 4KB one, despite providing 4x the data.
That means it takes slightly less time to evict or fault in a 16KB page on M1, than a 4KB page on Intel. And evicting one of these larger pages means you free up more memory in one go, so you are evicting pages less frequently when faced with the same usage pattern. Good data locality amplifies this further. But at the end of the day, it still means that the M1 effectively spends around 1/4th the time an Intel machine would handling swapping in the same usage.
So the M1 has a few tricks up it’s sleeve that does make page handling a little less expensive, which can help make swap use feel less punishing, leading to a smoother experience. It doesn’t mean you need less RAM than on Intel though, and with writes being a finite resource on an SSD, I wouldn’t be wanting to lean on the swap file to avoid having the extra RAM.
We know this because iPhones and iPads do not implement swapping at all! The iOS substitute for VM is to force backgrounded applications to quit whenever the foreground app needs more RAM.
As a developer that worked on a large iOS project, this is quite imprecise. The only difference between iOS and macOS’s VM implementation is that iOS disables the swap file. So while you are technically right, it misses the fact that memory compression and page eviction are still tools in the iOS box for RAM management.
Code locality made it easier on the system to evict code pages for features that weren’t frequently used, freeing up memory without forcing other apps to be quit. And we definitely saw iOS’ behavior that killing an app was last resort. Page evictions were the first thing iOS did before it would start doing that. Especially on the iPad.
Memory mapped files that were read-only (fonts) are also easy to evict and read again later.
Fixed/empty pages are cheap. Always evict them first.