Re: [PATCH RFC v3 0/7] mm: Fix MF_DELAYED handling on memory failure
From: Miaohe Lin
Date: Mon Apr 13 2026 - 07:49:21 EST
On 2026/4/9 1:24, Lisa Wang wrote:
> Here's a third 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 v2:
> + Address the comment about fixing the typos and clarifying the
> 'unmapped' status from Jiaqi
> + Address the comment about merging shmem memory failure selftest into
> memory failure selftest from Baolin
> + Align the consistent style in truncate_error_folio suggested by Miaohe
> + Fix some bugs found out by Sashiko. e.g. set vcpu register when VM is
> running.
> Thanks!
>
> Would like to request reviews from Miaohe and Baolin regarding the
> selftests:
> + Is adding more TEST_F()s suitable?
> + Are you expecting refactoring to reduce code duplication in
> selftests?
IMHO, when there are more and more memory failure testcases, we will inevitably
have to refactor the code. But for now, it probably isn't necessary yet.
Thanks.
.