lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8d21c1e-1bcb-e995-9b58-01ea3320085e@suse.cz>
Date:   Tue, 2 May 2023 09:45:40 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     Michal Hocko <mhocko@...e.com>,
        Lorenzo Stoakes <lstoakes@...il.com>
Subject: Re: mbind MPOL_INTERLEAVE existing pages

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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ