Re: [PATCH] kpageflags: detect isolated KPF_THP folios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-	} else if (is_zero_pfn(page_to_pfn(page)))
+	else if (folio_test_large(folio) &&
+	         folio_test_large_rmappable(folio)) {
+		/* Note: we indicate any THPs here, not just PMD-sized ones */
+		u |= 1 << KPF_THP;
+	} else if (is_huge_zero_folio(folio)) {
  		u |= 1 << KPF_ZERO_PAGE;
+		u |= 1 << KPF_THP;
+	} else if (is_zero_pfn(page_to_pfn(page))) {

We should also directly switch to "is_zero_folio(folio)" here

+		u |= 1 << KPF_ZERO_PAGE;
+	}
/*
  	 * Caveats on high order pages: PG_buddy and PG_slab will only be set

Especially relevant in context of:

https://lkml.kernel.org/r/1720075944-27201-1-git-send-email-yangge1116@xxxxxxx

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux