[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACw3F52QNe-JsnK1iu8s21LXGC9heZy0zsGvE3kaRz32HmqjNw@mail.gmail.com>
Date: Mon, 29 Sep 2025 08:15:46 -0700
From: Jiaqi Yan <jiaqiyan@...gle.com>
To: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>, Miaohe Lin <linmiaohe@...wei.com>,
"david@...hat.com" <david@...hat.com>
Cc: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"lorenzo.stoakes@...cle.com" <lorenzo.stoakes@...cle.com>, "Luck, Tony" <tony.luck@...el.com>,
"ziy@...dia.com" <ziy@...dia.com>,
"baolin.wang@...ux.alibaba.com" <baolin.wang@...ux.alibaba.com>,
"Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>, "npache@...hat.com" <npache@...hat.com>,
"ryan.roberts@....com" <ryan.roberts@....com>, "dev.jain@....com" <dev.jain@....com>,
"baohua@...nel.org" <baohua@...nel.org>, "nao.horiguchi@...il.com" <nao.horiguchi@...il.com>,
"Chen, Farrah" <farrah.chen@...el.com>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Zaborowski <andrew.zaborowski@...el.com>
Subject: Re: [PATCH 1/1] mm: prevent poison consumption when splitting THP
On Mon, Sep 29, 2025 at 6:57 AM Zhuo, Qiuxu <qiuxu.zhuo@...el.com> wrote:
>
> Hi Miaohe,
>
> > From: Miaohe Lin <linmiaohe@...wei.com>
> > [...]
> > >> 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.
Oh, sorry, somehow I forgot this so I thought there is no better place
to do the HWPoison check than in __folio_split. Yeah, since we know
the exact raw error page, checking in try_to_map_unused_to_zeropage
like David suggested is much better!
>
> 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
Powered by blists - more mailing lists