All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] mm: Fix MF_DELAYED handling on memory failure
@ 2026-09-17 20:43 Lisa Wang
  2026-09-17 20:43 ` [PATCH v6 1/5] mm: memory_failure: Clarify the MF_DELAYED definition Lisa Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Lisa Wang @ 2026-09-17 20:43 UTC (permalink / raw)
  To: Miaohe Lin, Naoya Horiguchi, Andrew Morton, Paolo Bonzini,
	Shuah Khan, Hugh Dickins, Baolin Wang, David Hildenbrand,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	linux-mm, linux-kernel, kvm, linux-kselftest, Andi Kleen,
	Hidehiro Kawai, Rik van Riel, Yu Zhang, Lorenzo Stoakes,
	Liam R. Howlett
  Cc: rientjes, seanjc, ackerleytng, vannapurve, michael.roth, jiaqiyan,
	tabba, dave.hansen, Lisa Wang, Isaku Yamahata, Xiaoyao Li

Here's a sixth revision to fix MF_DELAYED handling on memory failure.

This patch series addresses an issue in the memory failure handling path
where MF_DELAYED is incorrectly treated as an error. This issue was
discovered while testing memory failure handling for guest_memfd.

The proposed solution involves -
1. Clarifying the definition of MF_DELAYED to mean that memory failure
   handling is only partially completed, and that the metadata for the
   memory that failed (as in struct page/folio) is still referenced.
2. Updating shmem’s handling to align with the clarified definition.
3. Updating how the result of .error_remove_folio() is interpreted.

Changes from v5:
Add comment-style fallthrough in the memory-failure test, as suggested
by Ackerley and David

+ RFC v5: https://lore.kernel.org/all/20260823-memory-failure-mf-delayed-fix-v5-0-d97a5703e45a@google.com/

Signed-off-by: Lisa Wang <wyihan@google.com>
---
Lisa Wang (5):
      mm: memory_failure: Clarify the MF_DELAYED definition
      mm: memory_failure: Allow truncate_error_folio to return MF_DELAYED
      mm: shmem: Update shmem handler to the MF_DELAYED definition
      mm: memory_failure: Generalize extra_pins handling to all MF_DELAYED cases
      mm: selftests: Add shmem into memory failure test

 mm/memory-failure.c                         |  29 ++++---
 mm/shmem.c                                  |   2 +-
 tools/testing/selftests/mm/memory-failure.c | 114 +++++++++++++++++++++++++++-
 3 files changed, 126 insertions(+), 19 deletions(-)
---
base-commit: 08745c62350126bc31b09548137be87e2866f628
change-id: 20260527-memory-failure-mf-delayed-fix-7d5a8f4a8a8b

Best regards,
-- 
Lisa Wang <wyihan@google.com>


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

end of thread, other threads:[~2026-09-17 23:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 20:43 [PATCH v6 0/5] mm: Fix MF_DELAYED handling on memory failure Lisa Wang
2026-09-17 20:43 ` [PATCH v6 1/5] mm: memory_failure: Clarify the MF_DELAYED definition Lisa Wang
2026-09-17 20:43 ` [PATCH v6 2/5] mm: memory_failure: Allow truncate_error_folio to return MF_DELAYED Lisa Wang
2026-09-17 20:43 ` [PATCH v6 3/5] mm: shmem: Update shmem handler to the MF_DELAYED definition Lisa Wang
2026-09-17 20:43 ` [PATCH v6 4/5] mm: memory_failure: Generalize extra_pins handling to all MF_DELAYED cases Lisa Wang
2026-09-17 20:43 ` [PATCH v6 5/5] mm: selftests: Add shmem into memory failure test Lisa Wang
2026-09-17 20:57   ` sashiko-bot
2026-09-17 23:57 ` [PATCH v6 0/5] mm: Fix MF_DELAYED handling on memory failure Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.