public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level
@ 2017-09-13 10:10 Alexandru Moise
  2017-09-29 13:55 ` Kirill A. Shutemov
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Moise @ 2017-09-13 10:10 UTC (permalink / raw)
  To: akpm, mhocko, aneesh.kumar, n-horiguchi, mike.kravetz, khandual,
	punit.agrawal, gerald.schaefer, linux-kernel

since 94310cb we've been able to soft offline 1G hugepages at the PGD
level, however x86_64 gigantic hugepages are at the PUD level so we
should add an extra check to account for hstate order at PUD level.

I'm not sure if this also applies to 5 level page tables on x86_64
however. Tested with 4 level pagetable.

Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
 include/linux/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 8bbbd37ab105..86c3f3d9da0a 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -480,6 +480,7 @@ static inline bool hugepage_migration_supported(struct hstate *h)
 {
 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if ((huge_page_shift(h) == PMD_SHIFT) ||
+		(huge_page_shift(h) == PUD_SHIFT) ||
 		(huge_page_shift(h) == PGDIR_SHIFT))
 		return true;
 	else
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-29 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 10:10 [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level Alexandru Moise
2017-09-29 13:55 ` Kirill A. Shutemov
2017-09-29 14:55   ` Alexandru Moise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox