Skip to content

mm/khugepaged: fix khugepaged+shmem races

David Stevens linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 13 repliesIn review
  2. v43 patches 14 repliesSuperseded

Changes in v5 from the cover letter

- Rebase on mm-unstable (9caa15b8a499)
- Gather acks

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/khugepaged: refactor collapse_file control flowmm/khugepaged.c+108 -1111 reply
2/3mm/khugepaged: skip shmem with userfaultfdinclude/trace/events/huge_memory.h mm/khugepaged.c+73 -223 replies
3/3mm/khugepaged: maintain page cache uptodate flagmm/khugepaged.c+12 -389 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPeter XuYang ShiHugh Dickins
1/3A-b R-b A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/3] mm/khugepaged: fix khugepaged+shmem races

From: David Stevens <[email protected]>

Fix two races in khugepaged+shmem that cause issues with userfaultfd and lseek, respectively.

v4 -> v5:
- Rebase on mm-unstable (9caa15b8a499)
- Gather acks
v3 -> v4:
- Base changes on mm-everything (fba720cb4dc0)
- Add patch to refactor error handling control flow in collapse_file
- Rebase userfaultfd patch with no significant logic changes
- Different approach for fixing lseek race
v2 -> v3:
- Use XA_RETRY_ENTRY to synchronize with reads from the page cache under the RCU read lock in userfaultfd fix
- Add patch to fix lseek race
v1 -> v2:
- Different approach for userfaultfd fix

David Stevens (3):
mm/khugepaged: refactor collapse_file control flow mm/khugepaged: skip shmem with userfaultfd mm/khugepaged: maintain page cache uptodate flag

 include/trace/events/huge_memory.h |   3 +-
 mm/khugepaged.c                    | 259 ++++++++++++++++-------------
 2 files changed, 142 insertions(+), 120 deletions(-)
Signature · 1 line
2.40.0.rc0.216.gc4246ad0f0-goog