public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Moise <00moses.alexander00@gmail.com>
To: akpm@linux-foundation.org, mhocko@suse.com,
	aneesh.kumar@linux.vnet.ibm.com, n-horiguchi@ah.jp.nec.com,
	mike.kravetz@oracle.com, khandual@linux.vnet.ibm.com,
	punit.agrawal@arm.com, gerald.schaefer@de.ibm.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level
Date: Wed, 13 Sep 2017 12:10:47 +0200	[thread overview]
Message-ID: <20170913101047.GA13026@gmail.com> (raw)

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

             reply	other threads:[~2017-09-13 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 10:10 Alexandru Moise [this message]
2017-09-29 13:55 ` [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level Kirill A. Shutemov
2017-09-29 14:55   ` Alexandru Moise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170913101047.GA13026@gmail.com \
    --to=00moses.alexander00@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=punit.agrawal@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox