Re: [PATCH v9 08/15] hugetlb: Use the has_hwpoisoned flag
Pedro Falcato <[email protected]>
| Newsgroups | gmane.linux.file-systems,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 05, 2026 at 10:05:48PM +0100, Matthew Wilcox (Oracle) wrote: > Other large folios use the has_hwpoisoned flag. Convert hugetlb to match. > This will help us use the per-page hwpoison flag in the future. > > Also introduce a folio_test_huge_poison(). This has exactly the same > meaning as folio_test_has_hwpoisoned() but can be used when we don't have > a reference to the folio containing the page. folio_test_has_hwpoisoned() > can race with folio splitting / reallocation and trip the assertions > in const_folio_flags(). > > This closes a gap where a page in a previously-poisoned hugetlb folio > could be observed to not have the hwpoison bit set. > > Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> > Reviewed-by: Jane Chu <[email protected]> > Reviewed-by: Gregory Price (Meta) <[email protected]> > --- > diff --git a/mm/Kconfig b/mm/Kconfig > index 9e0ca4824905..e666dd14ca0c 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -843,11 +843,15 @@ config PERSISTENT_HUGE_ZERO_FOLIO > config MM_ID > def_bool n > > +config LARGE_FOLIO > + def_bool n random nit: def_bool n means the same as just bool I can't comment on hwpoison stuff, sorry :) -- Pedro