We're not checking the head page here, will this work reliably for
hugetlb? (I recall some difference in per-page hwpoison handling between
hugetlb and THP due to the vmemmap optimization)
Before this changes, the hwposioned hugetlb page won't try to unmap in
do_migrate_range(), we hope it already unmapped in memory_failure(), as
mentioned from comments, there maybe fail to unmap, so a new safeguard
to try to unmap it again here, but we don't need to guarantee it.
Thanks for clarifying!
But I do wonder if the PageHWPoison() is the right thing to do for hugetlb.
IIUC, hugetlb requires folio_test_hwpoison() -- testing the head page
not the subpage. Reason is that due to the vmemmap optimization we might
not be able to modify subpages to set hwpoison.
--
Cheers,
David / dhildenb