Re: [v3 PATCH 2/5] mm: filemap: check if THP has hwpoisoned subpage for PMD page fault

From: Yang Shi
Date: Tue Oct 12 2021 - 14:02:49 EST


On Mon, Oct 11, 2021 at 6:44 PM Peter Xu <peterx@xxxxxxxxxx> wrote:
>
> On Mon, Oct 11, 2021 at 08:55:26PM -0400, Peter Xu wrote:
> > Another thing is I noticed soft_offline_in_use_page() will still ignore file
> > backed split. I'm not sure whether it means we'd better also handle that case
> > as well, so shmem thp can be split there too?
>
> Please ignore this paragraph - I somehow read "!PageHuge(page)" as
> "PageAnon(page)"... So I think patch 5 handles soft offline too.

Yes, exactly. And even though the split is failed (or file THP didn't
get split before patch 5/5), soft offline would just return -EBUSY
instead of calling __soft_offline_page->page_handle_poison(). So
page_handle_poison() should not see THP at all.

>
> --
> Peter Xu
>