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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTHBjU5-Fio6CrwD@gourry-fedora-PF4VCD3F>
Date: Thu, 4 Dec 2025 12:14:53 -0500
From: Gregory Price <gourry@...rry.net>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: linux-mm@...ck.org, kernel-team@...a.com, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, osalvador@...e.de,
	akpm@...ux-foundation.org, lorenzo.stoakes@...cle.com,
	Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
	surenb@...gle.com, mhocko@...e.com, corbet@....net,
	muchun.song@...ux.dev, Mel Gorman <mgorman@...e.de>,
	Alexandru Moise <00moses.alexander00@...il.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH v3] mm, hugetlb: implement movable_gigantic_pages sysctl

On Wed, Dec 03, 2025 at 10:26:20AM +0100, David Hildenbrand (Red Hat) wrote:
> On 12/3/25 07:38, Gregory Price wrote:
> > This reintroduces a concept removed by:
> > commit d6cb41cc44c6 ("mm, hugetlb: remove hugepages_treat_as_movable sysctl")
> > 
> > This sysctl provides flexibility between ZONE_MOVABLE use cases:
> > 1) onlining memory in ZONE_MOVABLE to maintain hotplug compatibility
> > 2) onlining memory in ZONE_MOVABLE to make hugepage allocate reliable
> > 
> > When ZONE_MOVABLE is used to make huge page allocation more reliable,
> > disallowing gigantic pages memory in this region is pointless.  If
> > hotplug is not a requirement, we can loosen the restrictions to allow
> > 1GB gigantic pages in ZONE_MOVABLE.
> > 
> > Since 1GB can be difficult to migrate / has impacts on compaction /
> > defragmentation, we don't enable this by default. Notably, 1GB pages
> > can only be migrated if another 1GB page is available - so hot-unplug
> > will fail if such a page cannot be found.
> 
> In light of the other discussion: will it fail or will it simplt retry
> forever, until there is a free 1g page?
> 

It retries until a 1GB page is available.

Example test:

echo 0 > node0/hugepages/..-1GB/nr_hugepages (dram node)
echo 1 > node1/hugepages/..-1GB/nr_hugepages (zone_movable node)
./alloc_huge &                               (allocate the page)
./node1_offline  &                           (offline > memory*/state)
sleep 5                                      (give offline time)
echo 1 > node0/hugepages/..-1GB/nr_hugepages (dram node)

This node1_offline generates migration failures until the last step
occurs, at which point migration and node1_offline complete as expected.

The migration failures produce the following:

[  707.443105] migrating pfn c080000 failed ret:-12
[  707.453353] page: refcount:2 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xc080000
[  707.471315] head: order:18 mapcount:1 entire_mapcount:1 nr_pages_mapped:0 pincount:0
[  707.488504] anon flags: 0x17ffff0000000848(uptodate|owner_2|head|node=1|zone=3|lastcpupid=0x1ffff)
[  707.508393] page_type: f4(hugetlb)
[  707.515940] raw: 17ffff0000000848 ffa000007d873cc0 ffa000007d873cc0 ff1100082366c6e9
[  707.533126] raw: 0000000000000000 0000000000000010 00000002f4000000 0000000000000000
[  707.550317] head: 17ffff0000000848 ffa000007d873cc0 ffa000007d873cc0 ff1100082366c6e9
[  707.567699] head: 0000000000000000 0000000000000010 00000002f4000000 0000000000000000
[  707.585085] head: 17ffff0000000012 ffd4000302000001 0000000000000000 0000000000000000
[  707.602469] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000040000
[  707.619851] page dumped because: migration failure


I can add this to the changelog if you prefer

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ