Re: [PATCH v3 47/54] selftests/mm: thuge-gen: add setup of HugeTLB pages

From: Sarthak Sharma

Date: Thu May 07 2026 - 07:52:33 EST




On 4/29/26 2:12 AM, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
>
> thuge-gen skips tests if there are no free huge pages prepared by a wrapper
> script and shm liimts in proc are too low.
>
> Replace custom detection of huge pages with the library functions and add
> setup of HugeTLB pages and shm limits to the test and make sure that the
> original settings are restored on the test exit.
>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---

I have run the test before and after applying the patch. Before the
patch, all test sizes were skipped because hugepages were not
preallocated. After the patch, the test correctly allocates the required
hugepages and all tests pass, with the original settings restored at exit.

Tested-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>