Re: [PATCH v3] mm, hugetlb: implement movable_gigantic_pages sysctl

Gregory Price
2025-12-03T09:36:07Z

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?
>
...
> > +- When an admin sets the ``movable_gigantic_pages`` sysctl to true, gigantic
> > + pages are allowed in ZONE_MOVABLE. This only allows migratable gigantic
> > + pages to be allocated; however, if there are no eligible destination gigantic
> > + pages at offline, the offlining operation will fail.
>
> Same question here.
>

Hah, great question. I will make a note to try this in the morning.

> Nothing else jumped at me, in general as discussed, as long as it is opt-in
> behavior
>
> Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
>
> --
> Cheers
>
> David