On 08.01.25 22:19, Chris Li wrote:
On Wed, Jan 8, 2025 at 12:36 PM David Hildenbrand <david@xxxxxxxxxx> wrote:
Maybe the swapcache could somehow abstract that? We currently have the swap
slot allocator, that assigns slots to pages.
Assuming we have a 16 KiB BS but a 4 KiB page, we might have various options
to explore.
For example, we could size swap slots 16 KiB, and assign even 4 KiB pages a
single slot. This would waste swap space with small folios, that would go
away with large folios.
So batching order-0 folios in bigger slots that match the FS BS (e.g. 16
KiB) to perform disk writes, right?
Batching might be one idea, but the first idea I raised here would be
that the swap slot size will match the BS (e.g., 16 KiB) and contain at
most one folio.
So a order-0 folio would get a single slot assigned and effectively
"waste" 12 KiB of disk space.
I prefer not to "waste" that. It will be wasted on the write
amplification as well.
If it can be implemented fairly easily, sure! :)
Looking forward to hearing about the proposal!
--
Cheers,
David / dhildenb