On 07.01.25 10:43, Daniel Gomez wrote:
Hi,
Hi,
High-capacity SSDs require writes to be aligned with the drive's indirection unit (IU), which is typically >4 KiB, to avoid RMW. To support swap on these devices, we need to ensure that writes do not cross IU boundaries. So, I think this may require increasing the minimum allocation size for swap users.
How would we handle swapout/swapin when we have smaller pages (just imagine someone does a mmap(4KiB))?
Could this be something that gets abstracted/handled by the swap implementation? (i.e., multiple small folios get added to the swapcache but get written out / read in as a single unit?).
I recall that we have been talking about a better swap abstraction for years :)
Might be a good topic for LSF/MM (might or might not be a better place than the MM alignment session).
-- Cheers, David / dhildenb