[PATCH v2 0/8] mm: remove page_swap_entry()
Andrew Morton
akpm at linux-foundation.org
Tue Sep 8 10:55:12 PDT 2026
On Tue, 08 Sep 2026 11:16:30 -0400 Tal Zussman <tz2294 at columbia.edu> wrote:
> A folio in the swap cache occupies folio_nr_pages() contiguous swap
> entries starting at folio->swap, so a page's swap entry is just
> folio->swap plus the page's index in the folio. The swap entry is
> folio state, but the only helper for it is page-based:
> page_swap_entry() takes a page and recomputes the folio its callers
> already hold. Several callers avoid it by open-coding the arithmetic
> on folio->swap instead.
>
> Add folio_swap_entry() and folio_page_swap_entry(), convert all users,
> and remove page_swap_entry(), with a few other cleanups along the way.
Thanks, I'll queue this for testing and further review.
More information about the linux-arm-kernel
mailing list