From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Ashish Mhetre <amhetre@nvidia.com>,
linux-mm@kvack.org, akpm@linux-foundation.org, vdumpa@nvidia.com,
Snikam@nvidia.com
Subject: Re: [PATCH] mm: Disable movable allocation for TRANSHUGE pages
Date: Tue, 25 Sep 2018 20:30:19 +0200 [thread overview]
Message-ID: <20180925183019.GB22630@dhcp22.suse.cz> (raw)
In-Reply-To: <20180925115153.z5b5ekijf5jzhzmn@kshutemo-mobl1>
On Tue 25-09-18 14:51:53, Kirill A. Shutemov wrote:
> On Tue, Sep 25, 2018 at 12:55:33PM +0530, Ashish Mhetre wrote:
> > TRANSHUGE pages have no migration support.
>
> Transparent pages have migration support since v4.14.
This is true but not for all architectures AFAICS. In fact git grep
suggests that only x86 supports the migration. So unless I am missing
something the patch has some merit. But the implementation is simply
wrong. If anything it should be something like
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 76f8db0b0e71..2aff77966d92 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -297,7 +297,14 @@ struct vm_area_struct;
#define GFP_DMA32 __GFP_DMA32
#define GFP_HIGHUSER (GFP_USER | __GFP_HIGHMEM)
#define GFP_HIGHUSER_MOVABLE (GFP_HIGHUSER | __GFP_MOVABLE)
-#define GFP_TRANSHUGE_LIGHT ((GFP_HIGHUSER_MOVABLE | __GFP_COMP | \
+
+#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION
+#define GFP_TRANSHUGE_MOVABLE __GFP_MOVABLE
+#else
+#define GFP_TRANSHUGE_MOVABLE 0
+#endif
+
+#define GFP_TRANSHUGE_LIGHT ((GFP_HIGHUSER |GFP_TRANSHUGE_MOVABLE | __GFP_COMP | \
__GFP_NOMEMALLOC | __GFP_NOWARN) & ~__GFP_RECLAIM)
#define GFP_TRANSHUGE (GFP_TRANSHUGE_LIGHT | __GFP_DIRECT_RECLAIM)
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-09-25 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 7:25 [PATCH] mm: Disable movable allocation for TRANSHUGE pages Ashish Mhetre
2018-09-25 11:51 ` Kirill A. Shutemov
2018-09-25 18:30 ` Michal Hocko [this message]
2018-09-25 21:00 ` Kirill A. Shutemov
2018-09-25 21:11 ` Michal Hocko
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=20180925183019.GB22630@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=Snikam@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=amhetre@nvidia.com \
--cc=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=vdumpa@nvidia.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;
as well as URLs for NNTP newsgroup(s).