Hacker News new | ask | show | jobs
by rhnDN1 86 days ago
From the linked comment Zswap appears to write decompressed pages to disk. I assume Chesterton's fence applies, but why not write them compressed to disk and decompress when/if they need to be loaded back?

> After the folio has been decompressed into the swap cache, the compressed version stored by zswap can be freed.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

1 comments

THIS. This boggles my mind ever since zswap landed in the kernel.

Actually, forget zswap. Why the fuck swap's on disk format hasn't been compressed in the last 2 decades when processing power has been abundant and compressors like lzo/lz4 has been in kernel tree.