Skip to content

Commit 8d91fed

Browse files
davidhildenbrandakpm00
authored andcommitted
mm/huge_memory: convert has_hwpoisoned into a pure folio flag
Patch series "mm: hugetlb+THP folio and migration cleanups", v2. Some cleanups around more folio conversion and migration handling that I collected working on random stuff. This patch (of 6): Let's stop setting it on pages, there is no need to anymore. Link: https://lkml.kernel.org/r/20250113131611.2554758-2-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f57f63b commit 8d91fed

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

include/linux/page-flags.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,9 @@ TESTPAGEFLAG_FALSE(TransCompound, transcompound)
906906
*
907907
* This flag is set by hwpoison handler. Cleared by THP split or free page.
908908
*/
909-
PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
910-
TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
909+
FOLIO_FLAG(has_hwpoisoned, FOLIO_SECOND_PAGE)
911910
#else
912-
PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
913-
TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
911+
FOLIO_FLAG_FALSE(has_hwpoisoned)
914912
#endif
915913

916914
/*

mm/huge_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3290,7 +3290,7 @@ static void __split_huge_page(struct page *page, struct list_head *list,
32903290
/* lock lru list/PageCompound, ref frozen by page_ref_freeze */
32913291
lruvec = folio_lruvec_lock(folio);
32923292

3293-
ClearPageHasHWPoisoned(head);
3293+
folio_clear_has_hwpoisoned(folio);
32943294

32953295
for (i = nr - new_nr; i >= new_nr; i -= new_nr) {
32963296
struct folio *tail;

0 commit comments

Comments
 (0)