Re: [PATCH] mm/highmem: refuse to copy hwpoisoned folios in the !copy_mc fallbacks
From: Yuanhe Shu
Date: Tue Oct 27 2026 - 08:24:58 EST
On 10/26/26 11:21, Huang, Ying wrote:
> Therefore, the primary value of this patch should be to reduce
> machine checks (and panics) during memory copies. If so, we
> should place the check code before copying.
On the placement: agreed - the next version checks before the copy as
well, so data the flag already condemns is not read at all. The
check after the copy stays: a flag landing between the check and the
copy would otherwise be missed, and since the DDR poison state is
sticky, a late flag reliably marks bad data while the destination
folio carries no marker.
On software-injected poison: it was our reproducer, but the state is
not debugfs-only. Errors reported asynchronously (GHES et al.) set
PG_hwpoison with the data still readable, and a THP whose split fails
is left on the LRU flagged by design.
On the predicate: agreed, the next version checks
is_page_hwpoison(from) before and after the copy.
Performance numbers will follow with the next version.
--
Yuanhe