Does it actually work?
Does it actually work?
Posted Apr 11, 2025 14:51 UTC (Fri) by Wol (subscriber, #4433)In reply to: Does it actually work? by khim
Parent article: Three ways to rework the swap subsystem
I think you might be surprised then!
The original linux "swapping system" is pretty much an exact copy of the original Unix swapping system, which probably does date from your aforementioned 1970!
Do you remember back when Linus made a rather controversial change to linux swap, 2.4.10 or 2.6.10 I think - I remember it was roughly a 10 - that gave people running Vanilla Linux a massive shock? Do you remember the old saw that "swap must be at least twice ram" which most people - even back then - thought was an old wive's tale?
Because Linus ripped out all the optimisation code, and that requirement came back! If you had a swap file, and the system tried to touch just ONE BYTE of swap, if it didn't have at least twice ram available, it locked up. HARD. (Most people didn't notice, because the distros put the code back ...)
But that was sparked by Andrea Arcangeli and ?Rick van Riel? squabbling over a new approach to memory management. I don't know the end of that story, other than the "swap system" was replaced with something much better and I don't know what the new system does.
I thought all this was documented by LWN, and I've tried to find it on several occasions without success. It could have been Zak's Kernel News, which was quite big back then ...
Cheers,
Wol
