linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/mincore: minor clean up for swap cache checking
@ 2025-08-11 17:20 Kairui Song
  2025-08-11 17:20 ` [PATCH 1/2] mm/mincore, swap: consolidate swap cache checking for mincore Kairui Song
  2025-08-11 17:20 ` [PATCH 2/2] mm/mincore: use a helper for checking the swap cache Kairui Song
  0 siblings, 2 replies; 4+ messages in thread
From: Kairui Song @ 2025-08-11 17:20 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>

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/20250807152720.62032-1-ryncsn@gmail.com/

-- 
2.50.1



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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11 17:20 [PATCH 0/2] mm/mincore: minor clean up for swap cache checking Kairui Song
2025-08-11 17:20 ` [PATCH 1/2] mm/mincore, swap: consolidate swap cache checking for mincore Kairui Song
2025-08-11 19:11   ` Nhat Pham
2025-08-11 17:20 ` [PATCH 2/2] mm/mincore: use a helper for checking the swap cache Kairui Song

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