Re: [PATCH v3 30/54] selftests/mm: compaction_test: use HugeTLB helpers ...

Mike Rapoport
2026-05-05T15:26:53Z

On Mon, May 04, 2026 at 03:37:31PM +0530, Sarthak Sharma wrote:
> Hi Mike!
>
> On 4/29/26 2:12 AM, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> >
> > ... instead of open coded access of HugeTLB parameters via /proc.
> >
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> > ---
> > tools/testing/selftests/mm/compaction_test.c | 113 +++----------------
> > 1 file changed, 17 insertions(+), 96 deletions(-)
> >
> > diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c
> > index 30209c40b697..962a50c3d66f 100644
> > --- a/tools/testing/selftests/mm/compaction_test.c
> > +++ b/tools/testing/selftests/mm/compaction_test.c
> > @@ -17,6 +17,7 @@
> > #include <string.h>
> >
> > @@ -161,48 +120,10 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size,
> > ret = 0;
> >
> > close_fd:
>
> A small nit, should we rename close_fd: to out: now? After this change
> the label no longer closes an fd and is the common exit path, so
> close_fd feels a bit misleading.

Thanks, will fix.

> > - close(fd);
> > - out:
> > ksft_test_result(ret == 0, "check_compaction\n");
> > return ret;
> > }
> >

--
Sincerely yours,
Mike.