linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] mm/mincore: clean up swap cache helper and PTL
@ 2025-08-07 15:27 Kairui Song
  2025-08-07 15:27 ` [RFC PATCH 1/3] mm/mincore, swap: consolidate swap cache checking for mincore Kairui Song
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kairui Song @ 2025-08-07 15:27 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Liam R. Howlett, Lorenzo Stoakes, Vlastimil Babka,
	Jann Horn, Pedro Falcato, Matthew Wilcox, Hugh Dickins,
	David Hildenbrand, Chris Li, Barry Song, Baoquan He, Nhat Pham,
	Kemeng Shi, linux-kernel, Kairui Song

From: Kairui Song <kasong@tencent.com>

There is a swap cache helper that is only used by mincore. It was
seperated out from mincore some time ago to be shared with other users,
but now mincore is the only user again. So it can be easily merged back
to simplify the code.

Patch 1 clean this up, but I'm not very sure about Patch 2 and 3:

Realizing that the PTL seems only useful for stablizing the swap
cache space now, by grabbing the swap device before looking up the swap
cache space (patch 2), we can drop the PTL locking (patch 3).

Let me know if I'm missing something. With mmap lock, the mincore result
should be reliable enough without the PTL.

Kairui Song (3):
  mm/mincore, swap: consolidate swap cache checking for mincore
  mm/mincore: use a helper for checking the swap cache
  mm/mincore: avoid touching the PTL

 mm/mincore.c    | 53 ++++++++++++++++++++++++++++++++++++++-----------
 mm/swap.h       | 10 ----------
 mm/swap_state.c | 38 -----------------------------------
 3 files changed, 41 insertions(+), 60 deletions(-)

-- 
2.50.1



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

end of thread, other threads:[~2025-08-11  8:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 15:27 [RFC PATCH 0/3] mm/mincore: clean up swap cache helper and PTL Kairui Song
2025-08-07 15:27 ` [RFC PATCH 1/3] mm/mincore, swap: consolidate swap cache checking for mincore Kairui Song
2025-08-07 18:06   ` Nhat Pham
2025-08-07 18:23     ` Kairui Song
2025-08-07 15:27 ` [RFC PATCH 2/3] mm/mincore: use a helper for checking the swap cache Kairui Song
2025-08-07 15:27 ` [RFC PATCH 3/3] mm/mincore: avoid touching the PTL Kairui Song
2025-08-07 16:02   ` Jann Horn
2025-08-07 17:27     ` Kairui Song
2025-08-07 17:45       ` Jann Horn
2025-08-07 18:09         ` Kairui Song
2025-08-11  8:41   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).