Re: [PATCH 1/2] mm/compaction: skip folios containing hwpoisoned pages
From: Yuanhe Shu
Date: Tue Oct 20 2026 - 03:23:10 EST
On 10/11/26 21:14, Huang, Ying wrote:
> Is it good to implement the trick in copy_mc_user_highpage() and
> copy_mc_highpage() if the macro copy_mc_to_kernel is undefined?
Sounds good. That also covers the non-migration callers of the
fallbacks (COW, khugepaged, KSM), and composes with a real copy_mc
implementation for actual MCEs. I'll prepare it as a separate patch
with your Suggested-by, referenced from the v2 cover letter.
On 10/10/26 16:35, Kaitao Cheng wrote:
> Could we recheck PG_hwpoison on the source page after folio_mc_copy()
> completes, but before the mapping is transferred, and abort migration
> if the flag is set? This would prevent PG_hwpoison from being lost
> after migration.
Patch 2 already rechecks before the copy - your v2 check, moved a few
lines earlier. What it doesn't cover is the copy window itself: the
debugfs corrupt-pfn injector has no GUP ordering and can set the flag
mid-copy. Happy to carry the post-copy recheck in v2 as well.
--
Yuanhe