Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] mm: Fix MF_DELAYED handling on memory failure
@ 2026-08-23 19:40 Lisa Wang
  2026-08-23 19:40 ` [PATCH v5 1/5] mm: memory_failure: Clarify the MF_DELAYED definition Lisa Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Lisa Wang @ 2026-08-23 19:40 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 fifth 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 v4:
+ Add "fallthrough;" in the memory-failure test, as suggested by David
+ Add Fixes tags in the commit message, as suggested by Miaohe
+ Rebase to the branch "mm-stable"
+ Split the KVM selftests to the future series

Thanks for review from Ackerley, Andrew, David and Miaohe!

+ RFC v4: https://lore.kernel.org/all/20260602-memory-failure-mf-delayed-fix-v4-0-a5bc7db5a9b2@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 | 118 +++++++++++++++++++++++++++-
 3 files changed, 130 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] 7+ messages in thread

end of thread, other threads:[~2026-08-24 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23 19:40 [PATCH v5 0/5] mm: Fix MF_DELAYED handling on memory failure Lisa Wang
2026-08-23 19:40 ` [PATCH v5 1/5] mm: memory_failure: Clarify the MF_DELAYED definition Lisa Wang
2026-08-23 19:40 ` [PATCH v5 2/5] mm: memory_failure: Allow truncate_error_folio to return MF_DELAYED Lisa Wang
2026-08-23 19:40 ` [PATCH v5 3/5] mm: shmem: Update shmem handler to the MF_DELAYED definition Lisa Wang
2026-08-23 19:40 ` [PATCH v5 4/5] mm: memory_failure: Generalize extra_pins handling to all MF_DELAYED cases Lisa Wang
2026-08-23 19:40 ` [PATCH v5 5/5] mm: selftests: Add shmem into memory failure test Lisa Wang
2026-08-24 13:00   ` David Hildenbrand (Arm)

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