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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux