From: Vlastimil Babka <vbabka@suse.cz>
To: Mike Kravetz <mike.kravetz@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Michal Hocko <mhocko@suse.com>, Lorenzo Stoakes <lstoakes@gmail.com>
Subject: Re: mbind MPOL_INTERLEAVE existing pages
Date: Tue, 2 May 2023 09:45:40 +0200 [thread overview]
Message-ID: <c8d21c1e-1bcb-e995-9b58-01ea3320085e@suse.cz> (raw)
In-Reply-To: <20230501185836.GA85110@monkey>
On 5/1/23 20:58, Mike Kravetz wrote:
> I received a question from a customer that was trying to move pages via
> the mbind system call. In this specific case, the system had two nodes
> and all pages in the range were already present on node 0. They then
> called mbind with mode MPOL_INTERLEAVE and the MPOL_MF_MOVE_ALL flag. Their
> expectation was that half the pages in the range would be moved to node 1
> in an interleaved pattern.
>
> In the above situation, no pages actually get moved. This is because mbind
> creates a list of pages to be moved via:
>
> ret = queue_pages_range(mm, start, end, nmask,
> flags | MPOL_MF_INVERT, &pagelist);
>
> No page will be added to the list as queue_folio_required is called for each
> page to determine if it resides within the set of nodes. And, all page are
> within the set.
>
> I have reread the mbind man page several times and agree that one might
> expect MPOL_INTERLEAVE with MPOL_MF_MOVE_ALL to move pages and create an
> interleaved pattern. My question is should we:
> - Change mbind so that pages are moved to an interleaved pattern?
I guess it could be worth trying, if there's a use case. And hope nobody
else is depending on the current behavior and will complain afterwards :)
> - Update the documentation to be more explicit?
>
> I can do either, but just wanted to get opinions before starting.
next prev parent reply other threads:[~2023-05-02 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-01 18:58 Mike Kravetz
2023-05-02 7:45 ` Vlastimil Babka [this message]
2023-05-02 13:12 ` Michal Hocko
2023-05-02 16:34 ` Mike Kravetz
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=c8d21c1e-1bcb-e995-9b58-01ea3320085e@suse.cz \
--to=vbabka@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.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