Re: [PATCH 1/1] mm: swap: add nr argument in swapcache_prepare and swapcache_clear to support large folios

From: David Hildenbrand
Date: Tue Jul 30 2024 - 03:42:27 EST


On 30.07.24 09:13, Barry Song wrote:
From: Barry Song <v-songbaohua@xxxxxxxx>

Right now, swapcache_prepare() and swapcache_clear() supports one entry
only, to support large folios, we need to handle multiple swap entries.

To optimize stack usage, we iterate twice in __swap_duplicate(): the
first time to verify that all entries are valid, and the second time
to apply the modifications to the entries.

Currently, we're using nr=1 for the existing users.

Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
---


Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb