linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 08/15] mm/madvise: enable soft offline of HugeTLB pages at PUD level
@ 2017-11-30 22:15 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-11-30 22:15 UTC (permalink / raw)
  To: linux-mm, akpm, 00moses.alexander00, aneesh.kumar,
	gerald.schaefer, khandual, kirill, mhocko, mike.kravetz,
	n-horiguchi, punit.agrawal

From: Alexandru Moise <00moses.alexander00@gmail.com>
Subject: mm/madvise: enable soft offline of HugeTLB pages at PUD level

Since 94310cbcaa3c2 ("mm/madvise: enable (soft|hard) offline of HugeTLB
pages at PGD level") 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.

It allows migration of 1G pages in general.  It also makes these pages
allocated with GFP_HIGHUSER_MOVABLE instead of GFP_HIGHUSER.

There's nothing changed in this regard in 5-level paging mode.  PUD is
still one gig and there are no new page sizes.

Tested with 4 level pagetable.

Link: http://lkml.kernel.org/r/20170913101047.GA13026@gmail.com
Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/hugetlb.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN include/linux/hugetlb.h~mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level include/linux/hugetlb.h
--- a/include/linux/hugetlb.h~mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level
+++ a/include/linux/hugetlb.h
@@ -473,6 +473,7 @@ static inline bool hugepage_migration_su
 {
 #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
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-30 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 22:15 [patch 08/15] mm/madvise: enable soft offline of HugeTLB pages at PUD level akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).