Re: [PATCH v3 42/54] selftests/mm: hugetlb-soft-online: add setup of HugeTLB pages

From: Mike Rapoport

Date: Mon May 11 2026 - 04:32:08 EST


Hi Sarthak,

On Tue, May 05, 2026 at 12:45:52PM +0530, Sarthak Sharma wrote:
> Hi Mike!
>
> On 4/29/26 2:12 AM, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
> >
> > hugetlb-soft-online test uses open coded access to /proc to determine
> > availability of huge pages and fails if there are no enough free huget
> > pages..
> >
> > Replace open coded access to /proc with hugepage helpers and add setup
> > of HugeTLB pages to the test and make sure that the original settings
> > are restored on the test exit.
> >
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
>
> The test is hugetlb-soft-offline, so let's change the commit title and
> commit message to say "offine" instead of "online".

Good catch :)

> I have run the test before and after applying the patch. Before the
> patch, it failed with an mmap error when hugepages were not
> preallocated. After applying the patch, the test correctly allocates the
> required hugepages and the test passes.
>
> Tested-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>

--
Sincerely yours,
Mike.