Re: [PATCH v2 0/2] mm: don't migrate folios containing hwpoisoned pages
From: Yuanhe Shu
Date: Wed Oct 28 2026 - 08:23:17 EST
On 10/28/26 09:02, David Hildenbrand wrote:
> Why is that a problem?
>
> Why do you care?
The flagged state is not debug-only. A real error on an isolated
folio leaves PG_hwpoison set. The data is still readable. A THP
that cannot split is left on the LRU flagged, by design. A copy
then propagates the poison silently: no marker, no hwpoison PTE,
no SIGBUS.
Thinking about it again, the copy layer is indeed the better
place. So how about this: drop patch 2, and put the flag check in
the copy implementations instead. The fallback patch already checks
is_page_hwpoison() before and after the copy on the !copy_mc archs.
The same checks in the copy_mc implementations would cover x86_64
and PPC64. folio_mc_copy() then propagates the refusal to the
migration core. Patch 1, the compaction skip, stands alone. Does
that work for you?
--
Yuanhe