RE: [PATCH 1/1] mm: prevent poison consumption when splitting THP
From: Zhuo, Qiuxu
Date: Mon Sep 29 2025 - 09:57:15 EST
Hi Miaohe,
> From: Miaohe Lin <linmiaohe@xxxxxxxxxx>
> [...]
> >> First Machine Check occurs // [1]
> >> memory_failure() // [2]
> >> try_to_split_thp_page()
> >> split_huge_page()
> >> split_huge_page_to_list_to_order()
> >> __folio_split() // [3]
> >> remap_page()
> >> remove_migration_ptes()
> >> remove_migration_pte()
> >> try_to_map_unused_to_zeropage()
> >
> > Just an observation: Unfortunately THP only has PageHasHWPoisoned and
> > don't know the exact HWPoisoned page. Otherwise, we may still use
> > zeropage for these not HWPoisoned.
>
> IIUC, the raw error page will have HWPoisoned flag set while the THP has
> PageHasHWPoisoned set. So I think we could use zeropage for healthy sub-
> pages.
Good point.
David's suggested diff in another e-mail checked the raw error page instead of
entire folio. And I tested that diff and it worked well.
-Qiuxu