Skip to content

mm/smaps: Fixes and optimizations on shmem swap handling

Peter Xu linux-mm lkml 1 version Applied

Status from this message: [merged] mm-smaps-simplify-shmem-handling-of-pte-holes.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/smaps: Fix shmem pte hole swap calculationfs/proc/task_mmu.c+4 -21 replyApplied
2/3mm/smaps: Use vma->vm_pgoff directly when counting partial swapmm/shmem.c+2 -31 replyApplied
3/3mm/smaps: Simplify shmem handling of pte holesfs/proc/task_mmu.c+12 -102 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchVlastimil Babka
1/3R-b
2/3R-b
3/3

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/3] mm/smaps: Fixes and optimizations on shmem swap handling

This series grows from the patch previously posted here:

[PATCH] mm/smaps: Use vma->vm_pgoff directly when counting partial swap
https://lore.kernel.org/lkml/[email protected]/

Vlastimil reported a bug that is even more important to fix than the cleanup, so I put it as patch 1 here. There's a test program we can use to verify the bug before/after the patch. I used the same program to test patch 2/3 because it covers walking shmem swap both in page cache and in pgtables.

Patch 2 is the original patch, though with a tiny touchup as Vlastimil suggested.

Patch 3 is a further cleanup of the shmem swap logic, hopefully make it even cleaner.

Please review, thanks.

Peter Xu (3):
mm/smaps: Fix shmem pte hole swap calculation mm/smaps: Use vma->vm_pgoff directly when counting partial swap mm/smaps: Simplify shmem handling of pte holes

 fs/proc/task_mmu.c | 28 ++++++++++++++++------------
 mm/shmem.c         |  5 ++---
 2 files changed, 18 insertions(+), 15 deletions(-)
Signature · 1 line
2.31.1