Re: [PATCH 1/1] mm: prevent poison consumption when splitting THP
From: Lance Yang
Date: Mon Sep 29 2025 - 21:49:24 EST
On Tue, Sep 30, 2025 at 3:07 AM David Hildenbrand <david@xxxxxxxxxx> wrote:
>
> On 29.09.25 18:30, Zhuo, Qiuxu wrote:
> > Hi Tony,
> >
> >> From: Luck, Tony <tony.luck@xxxxxxxxx>
> >> [...]
> >> Subject: RE: [PATCH 1/1] mm: prevent poison consumption when splitting THP
> >>
> >>> Miaohe mentioned in another e-mail that there was an HWPoisoned flag
> >> for the raw error 4K page.
> >>> We could use that flag just to skip that raw error page and still use
> >>> the zeropage for other healthy sub-pages. I'll try that.
> >>
> >> That HWPoisoned flag is only set for raw pages where an error has been
> >> detected. Maybe Linux could implement an
> >> "is_this_page_all_zero_mc_safe()"[1] that would catch undetected poison
> >
> > This sounds like a great suggestion to me.
> > Let's see what others think about this and the name (though the name already LGTM 😊).
>
> The function name is just ... special. Not the good type of special IMHO. :)
>
> Note that we'll be moving to pages_identical() in [1]. Maybe we would
> want a pages_identical_mc() or sth. like that as a follow up later.
>
>
> So in any case, make that a follow-up work on top of a simple fix.
Yeah. IIRC, as David suggested earlier, we can just check if a page is
poisoned using PageHWPoison().
Perhaps we should move this check into pages_identical()? This would make
it a central place to determine if pages are safe to access and merge ;)
BTW, could you please keep me in the loop for the next version?
Thanks,
Lance
>
> [1] https://lore.kernel.org/all/20250922021458.68123-1-lance.yang@xxxxxxxxx/
>
> --
> Cheers
>
> David / dhildenb
>
>