From: Michal Hocko <mhocko@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Zi Yan <zi.yan@cs.rutgers.edu>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Stefan Priebe <s.priebe@profihost.ag>
Subject: Re: [PATCH] mm, thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings
Date: Wed, 12 Sep 2018 14:05:04 +0200 [thread overview]
Message-ID: <20180912120504.GE10951@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.21.1809111319060.189563@chino.kir.corp.google.com>
On Tue 11-09-18 13:30:20, David Rientjes wrote:
> On Tue, 11 Sep 2018, Michal Hocko wrote:
[...]
> > hugepage specific MPOL flags sounds like yet another step into even more
> > cluttered API and semantic, I am afraid. Why should this be any
> > different from regular page allocations? You are getting off-node memory
> > once your local node is full. You have to use an explicit binding to
> > disallow that. THP should be similar in that regards. Once you have said
> > that you _really_ want THP then you are closer to what we do for regular
> > pages IMHO.
> >
>
> Saying that we really want THP isn't an all-or-nothing decision. We
> certainly want to try hard to fault hugepages locally especially at task
> startup when remapping our .text segment to thp, and MADV_HUGEPAGE works
> very well for that. Remote hugepages would be a regression that we now
> have no way to avoid because the kernel doesn't provide for it, if we were
> to remove __GFP_THISNODE that this patch introduces.
Why cannot you use mempolicy to bind to local nodes if you really care
about the locality?
> On Broadwell, for example, we find 7% slower access to remote hugepages
> than local native pages. On Naples, that becomes worse: 14% slower access
> latency for intrasocket hugepages compared to local native pages and 39%
> slower for intersocket.
So, again, how does this compare to regular 4k pages? You are going to
pay for the same remote access as well.
From what you have said so far it sounds like you would like to have
something like the zone/node reclaim mode fine grained for a specific
mapping. If we really want to support something like that then it should
be a generic policy rather than THP specific thing IMHO.
As I've said it is hard to come up with a solution that would satisfy
everybody but considering that the existing reports are seeing this a
regression and cosindering their NUMA requirements are not so strict as
yours I would tend to think that stronger NUMA requirements should be
expressed explicitly rather than implicit effect of a madvise flag. We
do have APIs for that.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-09-12 12:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 13:05 Michal Hocko
2018-09-08 18:52 ` Stefan Priebe - Profihost AG
2018-09-10 7:39 ` Michal Hocko
2018-09-11 9:03 ` Vlastimil Babka
2018-09-10 20:08 ` David Rientjes
2018-09-10 20:22 ` Stefan Priebe - Profihost AG
2018-09-11 8:51 ` Vlastimil Babka
2018-09-11 11:56 ` Michal Hocko
2018-09-11 20:30 ` David Rientjes
2018-09-12 12:05 ` Michal Hocko [this message]
2018-09-12 20:40 ` David Rientjes
2018-09-12 13:54 ` Andrea Arcangeli
2018-09-12 14:21 ` Michal Hocko
2018-09-12 15:25 ` 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=20180912120504.GE10951@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=s.priebe@profihost.ag \
--cc=zi.yan@cs.rutgers.edu \
/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
all inboxes | Powered by JetHome®