mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] mm: remove page_swap_entry()
@ 2026-08-30 10:32 Tal Zussman
  2026-08-30 10:32 ` [PATCH 1/8] mm/swap: add folio_swap_entry() and folio_page_swap_entry() Tal Zussman
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Tal Zussman @ 2026-08-30 10:32 UTC (permalink / raw)
  To: Andrew Morton, Chris Li, Kairui Song, Kemeng Shi, Nhat Pham,
	Baoquan He, Barry Song, Youngjun Park, David Hildenbrand, Zi Yan,
	Baolin Wang, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain,
	Lance Yang, Usama Arif, Kiryl Shutsemau, Lorenzo Stoakes,
	Rik van Riel, Vlastimil Babka, Harry Yoo, Jann Horn,
	Johannes Weiner, Yosry Ahmed, Chengming Zhou, Catalin Marinas,
	Will Deacon, Mark Rutland
  Cc: linux-mm, linux-kernel, linux-arm-kernel, Tal Zussman

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.

---
Tal Zussman (8):
      mm/swap: add folio_swap_entry() and folio_page_swap_entry()
      mm/huge_memory: use folio_swap_entry() when splitting a swapcache folio
      mm/rmap: use folio_page_swap_entry() in ttu_anon_swapbacked_folio()
      mm/zswap: convert the store path to take a folio and index
      mm/swapfile: use folio_page_swap_entry()
      arm64: mte: make mte_save_tags() and mte_restore_tags() static
      arm64: mte: pass the swap entry to mte_save_tags()
      mm/swap: remove page_swap_entry()

 arch/arm64/include/asm/mte.h |  2 --
 arch/arm64/mm/mteswap.c      | 32 ++++++++++++++------------------
 include/linux/swap.h         | 30 +++++++++++++++++++++++++++---
 mm/huge_memory.c             |  2 +-
 mm/rmap.c                    |  2 +-
 mm/swapfile.c                |  4 ++--
 mm/zswap.c                   | 25 +++++++++++--------------
 7 files changed, 56 insertions(+), 41 deletions(-)
---
base-commit: da6c37ed8beb273e3308e42d4bca3ce11b4432fa
change-id: 20260807-folio_swap_entry-e53d68610de0

Best regards,
--  
Tal Zussman <tz2294@columbia.edu>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-08-31 23:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-30 10:32 [PATCH 0/8] mm: remove page_swap_entry() Tal Zussman
2026-08-30 10:32 ` [PATCH 1/8] mm/swap: add folio_swap_entry() and folio_page_swap_entry() Tal Zussman
2026-08-30 10:32 ` [PATCH 2/8] mm/huge_memory: use folio_swap_entry() when splitting a swapcache folio Tal Zussman
2026-08-31 14:50   ` Zi Yan
2026-08-31 23:38     ` Tal Zussman
2026-08-30 10:32 ` [PATCH 3/8] mm/rmap: use folio_page_swap_entry() in ttu_anon_swapbacked_folio() Tal Zussman
2026-08-30 10:32 ` [PATCH 4/8] mm/zswap: convert the store path to take a folio and index Tal Zussman
2026-08-30 10:32 ` [PATCH 5/8] mm/swapfile: use folio_page_swap_entry() Tal Zussman
2026-08-30 10:32 ` [PATCH 6/8] arm64: mte: make mte_save_tags() and mte_restore_tags() static Tal Zussman
2026-08-30 10:32 ` [PATCH 7/8] arm64: mte: pass the swap entry to mte_save_tags() Tal Zussman
2026-08-30 10:32 ` [PATCH 8/8] mm/swap: remove page_swap_entry() Tal Zussman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®