Skip to content

mm/mincore: minor clean up for swap cache checking

Kairui Song linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Changelog from the cover letter

- Remove RFC prefix.
- Don't touch the PTL for now [ Jann Horn, David Hildenbrand ]
- Fix error check for filemap_get_folio [ Nhat Pham ]

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm/mincore, swap: consolidate swap cache checking for mincoremm/mincore.c mm/swap.h mm/swap_state.c+27 -501 reply
2/2mm/mincore: use a helper for checking the swap cachemm/mincore.c+49 -410 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNhat Pham
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm/mincore: minor clean up for swap cache checking

From: Kairui Song <[email protected]>

This series cleans up a swap cache helper only used by mincore, move it back into mincore code. Also separate the swap cache related logics out of shmem / page cache logics in mincore.

With this series we have less lines of code and better performance.

Before this series:
mincore on a swaped out 16G anon mmap range:
Took 488220 us
mincore on 16G shmem mmap range:
Took 530272 us.

After this series:
mincore on a swaped out 16G anon mmap range:
Took 446763 us
mincore on 16G shmem mmap range:
Took 460496 us.

About ~10% faster.

Kairui Song (2):
mm/mincore, swap: consolidate swap cache checking for mincore mm/mincore: use a helper for checking the swap cache

 mm/mincore.c    | 70 +++++++++++++++++++++++++++++++++++--------------
 mm/swap.h       | 10 -------
 mm/swap_state.c | 38 ---------------------------
 3 files changed, 51 insertions(+), 67 deletions(-)

---

Changelog:
- Remove RFC prefix.
- Don't touch the PTL for now [ Jann Horn, David Hildenbrand ]
- Fix error check for filemap_get_folio [ Nhat Pham ]

RFC: https://lore.kernel.org/linux-mm/[email protected]/

Signature · 1 line
2.50.1