From: Alexandru Moise <00moses.alexander00@gmail.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: 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: Re: [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level
Date: Fri, 29 Sep 2017 16:55:29 +0200 [thread overview]
Message-ID: <20170929145529.GA1659@gmail.com> (raw)
In-Reply-To: <20170929135554.6cz7lpjn7gepmlf4@node.shutemov.name>
On Fri, Sep 29, 2017 at 04:55:54PM +0300, Kirill A. Shutemov wrote:
> On Wed, Sep 13, 2017 at 12:10:47PM +0200, Alexandru Moise wrote:
> > 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.
>
> Have you tested other cases affected by the change? It allows migration of
> 1G pages in general, which might be problematic.
Yes true, I could have done a better job explaining this in the commit message.
>
> It also makes these pages allocated with GFP_HIGHUSER_MOVABLE instead of
> GFP_HIGHUSER. Any side effects there we should consider?
Well, it makes hugepages_treat_as_movable sysctl pointless for one.
Perhaps the below patch would be a good idea, to make this behavior
optional rather.
../Alex
>
> > I'm not sure if this also applies to 5 level page tables on x86_64
> > however. Tested with 4 level pagetable.
>
> There's nothing changed in this regard in 5-level paging mode. PUD is
> still one gig and there are no new page sizes.
>
> --
> Kirill A. Shutemov
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 424b0ef08a60..ab28de0122af 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -926,7 +926,7 @@ static struct page *dequeue_huge_page_nodemask(struct hstate *h, gfp_t gfp_mask,
/* Movability of hugepages depends on migration support. */
static inline gfp_t htlb_alloc_mask(struct hstate *h)
{
- if (hugepages_treat_as_movable || hugepage_migration_supported(h))
+ if (hugepages_treat_as_movable && hugepage_migration_supported(h))
return GFP_HIGHUSER_MOVABLE;
else
return GFP_HIGHUSER;
--
2.14.2
prev parent reply other threads:[~2017-09-29 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20170929145529.GA1659@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=kirill@shutemov.name \
--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