Re: [PATCH 0/3] mm/hugetlb: hugepage migration enhancements
From: Mike Kravetz
Date: Thu Sep 22 2022 - 18:41:58 EST
On 09/22/22 13:25, Mike Kravetz wrote:
> On 09/21/22 15:36, Doug Berger wrote:
>
> As noted above, for pages to be migrated we first try to use an existing
> free huge page as the target. Quite some time ago, Michal added code to
> allocate a new page from buddy as the target if no free huge pages were
> available. This change also included a special flag to dissolve the
> source huge page when it is freed. It seems like this is the exact
> behavior we want here? I wonder if it might be easier just to use this
> existing code?
Totally untested, but I believe the patch below would accomplish this.