Skip to content

RFC mm/mincore: clean up swap cache helper and PTL

Kairui Song linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/mincore, swap: consolidate swap cache checking for mincoremm/mincore.c mm/swap.h mm/swap_state.c+27 -502 replies
2/3mm/mincore: use a helper for checking the swap cachemm/mincore.c+31 -270 replies
3/3mm/mincore: avoid touching the PTLmm/mincore.c+3 -35 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] mm/mincore: clean up swap cache helper and PTL

From: Kairui Song <[email protected]>

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(-)
Signature · 1 line
2.50.1