From: David Rientjes via iommu <iommu@lists.linux-foundation.org>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Cc: "jean-philippe@linaro.org" <jean-philippe@linaro.org>,
"kevin.tian@intel.com" <kevin.tian@intel.com>,
"chensihang \(A\)" <chensihang1@hisilicon.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Liguozhu \(Kenneth\)" <liguozhu@hisilicon.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin
Date: Sun, 7 Feb 2021 18:18:01 -0800 (PST) [thread overview]
Message-ID: <90aca1e9-61b5-88d-d28c-369e6973559e@google.com> (raw)
In-Reply-To: <f4b2d7db8a1047d9952cbbfaf9e27824@hisilicon.com>
On Sun, 7 Feb 2021, Song Bao Hua (Barry Song) wrote:
> NUMA balancer is just one of many reasons for page migration. Even one
> simple alloc_pages() can cause memory migration in just single NUMA
> node or UMA system.
>
> The other reasons for page migration include but are not limited to:
> * memory move due to CMA
> * memory move due to huge pages creation
>
> Hardly we can ask users to disable the COMPACTION, CMA and Huge Page
> in the whole system.
>
What about only for mlocked memory, i.e. disable
vm.compact_unevictable_allowed?
Adding syscalls is a big deal, we can make a reasonable inference that
we'll have to support this forever if it's merged. I haven't seen mention
of what other unevictable memory *should* be migratable that would be
adversely affected if we disable that sysctl. Maybe that gets you part of
the way there and there are some other deficiencies, but it seems like a
good start would be to describe how CONFIG_NUMA_BALANCING=n +
vm.compact_unevcitable_allowed + mlock() doesn't get you mostly there and
then look into what's missing.
If it's a very compelling case where there simply are no alternatives, it
would make sense. Alternative is to find a more generic way, perhaps in
combination with vm.compact_unevictable_allowed, to achieve what you're
looking to do that can be useful even beyond your originally intended use
case.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-02-08 2:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 8:18 [RFC PATCH v3 0/2] mempinfd: Add new syscall to provide memory pin Zhou Wang
2021-02-07 8:18 ` [RFC PATCH v3 1/2] " Zhou Wang
2021-02-07 21:34 ` Matthew Wilcox
2021-02-07 22:24 ` Song Bao Hua (Barry Song)
2021-02-08 1:30 ` Matthew Wilcox
2021-02-08 2:27 ` Song Bao Hua (Barry Song)
2021-02-08 8:21 ` David Hildenbrand
2021-02-08 10:13 ` Song Bao Hua (Barry Song)
2021-02-08 10:37 ` David Hildenbrand
2021-02-08 20:52 ` Song Bao Hua (Barry Song)
2021-02-08 2:18 ` David Rientjes via iommu [this message]
2021-02-08 5:34 ` Song Bao Hua (Barry Song)
2021-02-07 21:51 ` Arnd Bergmann
2021-02-09 9:27 ` Zhou Wang
2021-02-07 22:02 ` Andy Lutomirski
2021-02-09 9:17 ` Zhou Wang
2021-02-09 9:37 ` Greg KH
2021-02-09 11:58 ` Zhou Wang
2021-02-09 12:01 ` Greg KH
2021-02-09 12:20 ` Zhou Wang
2021-02-10 18:50 ` Matthew Wilcox
2021-02-08 8:14 ` David Hildenbrand
2021-02-08 18:33 ` Jason Gunthorpe
2021-02-08 20:35 ` Song Bao Hua (Barry Song)
2021-02-08 21:30 ` Jason Gunthorpe
2021-02-09 3:01 ` Song Bao Hua (Barry Song)
2021-02-09 13:53 ` Jason Gunthorpe
2021-02-09 22:22 ` Song Bao Hua (Barry Song)
2021-02-10 18:04 ` Jason Gunthorpe
2021-02-10 21:39 ` Song Bao Hua (Barry Song)
2021-02-11 10:28 ` David Hildenbrand
2021-02-07 8:18 ` [RFC PATCH v3 2/2] selftests/vm: add mempinfd test Zhou Wang
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=90aca1e9-61b5-88d-d28c-369e6973559e@google.com \
--to=iommu@lists.linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=chensihang1@hisilicon.com \
--cc=gregkh@linuxfoundation.org \
--cc=jean-philippe@linaro.org \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=liguozhu@hisilicon.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=song.bao.hua@hisilicon.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=zhangfei.gao@linaro.org \
/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).