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] [day] [month] [year] [list]
Message-ID: <dd6428a4-2984-e8f0-2760-bc2c7056b009@google.com>
Date: Wed, 24 Dec 2025 13:45:21 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Gregory Price <gourry@...rry.net>
cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
    linux-doc@...r.kernel.org, kernel-team@...a.com, david@...nel.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, 
    hannes@...xchg.org, David Hildenbrand <david@...hat.com>, 
    Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH v5] mm, hugetlb: implement movable_gigantic_pages
 sysctl

On Sun, 21 Dec 2025, 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.
> 
> However, since there are scenarios where gigantic pages are migratable,
> we should allow use of these on movable regions.
> 
> When not valid 1GB is available for migration, hot-unplug will retry
> indefinitely (or until interrupted).  For example:
> 
>   echo 0 > node0/hugepages/..-1GB/nr_hugepages  # clear node0 1GB pages
>   echo 1 > node1/hugepages/..-1GB/nr_hugepages  # reserve node1 1GB page
>   ./alloc_huge_node1 &    # Allocate a 1GB page on node1
>   ./node1_offline  &      # attempt to offline all node1 memory
>   echo 1 > node0/hugepages/..-1GB/nr_hugepages  # reserve node0 1GB page
> 
> In this example, node1_offline will block indefinitely until the final
> step, when a node0 1GB page is made available.
> 
> Note: Boot-time CMA is not possible for driver-managed hotplug memory,
> as CMA requires the memory to be registered as SystemRAM at boot time.
> Additionally, 1GB huge pages are not supported by THP.
> 
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Michal Hocko <mhocko@...e.com>
> Suggested-by: David Rientjes <rientjes@...gle.com>
> Signed-off-by: Gregory Price <gourry@...rry.net>
> Link: https://lore.kernel.org/all/20180201193132.Hk7vI_xaU%25akpm@linux-foundation.org/

Acked-by: David Rientjes <rientjes@...gle.com>

Thanks for pursuing this, Gregory.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ