linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] mm/khugepaged: fix khugepaged+shmem races
@ 2023-02-17  8:54 David Stevens
  2023-02-17  8:54 ` [PATCH v4 1/3] mm/khugepaged: refactor collapse_file control flow David Stevens
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: David Stevens @ 2023-02-17  8:54 UTC (permalink / raw)
  To: linux-mm, Peter Xu, Matthew Wilcox
  Cc: Andrew Morton, Kirill A . Shutemov, Yang Shi, David Hildenbrand,
	Hugh Dickins, linux-kernel, David Stevens

From: David Stevens <stevensd@chromium.org>

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

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                    | 263 ++++++++++++++++-------------
 2 files changed, 144 insertions(+), 122 deletions(-)

-- 
2.39.2.637.g21b0678d19-goog



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

end of thread, other threads:[~2023-03-06 21:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  8:54 [PATCH v4 0/3] mm/khugepaged: fix khugepaged+shmem races David Stevens
2023-02-17  8:54 ` [PATCH v4 1/3] mm/khugepaged: refactor collapse_file control flow David Stevens
2023-02-17 23:44   ` Yang Shi
2023-02-21 21:54   ` Peter Xu
2023-02-21 22:28     ` Yang Shi
2023-02-22  4:08     ` David Stevens
2023-02-22 16:24       ` Peter Xu
2023-02-17  8:54 ` [PATCH v4 2/3] mm/khugepaged: skip shmem with userfaultfd David Stevens
2023-02-21 22:12   ` Peter Xu
2023-02-17  8:54 ` [PATCH v4 3/3] mm/khugepaged: maintain page cache uptodate flag David Stevens
2023-02-21 22:18   ` Peter Xu
2023-02-17 10:37 ` [PATCH v4 0/3] mm/khugepaged: fix khugepaged+shmem races Miko Larsson
2023-03-03 15:35 ` Peter Xu
2023-03-03 15:45   ` Zach O'Keefe
2023-03-03 18:55   ` Yang Shi
2023-03-03 22:52   ` Andrew Morton
2023-03-06  2:44     ` David Stevens
2023-03-06 21:25       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).