Re: [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
From: Yeoreum Yun
Date: Wed Sep 23 2026 - 12:53:48 EST
On Wed, Sep 23, 2026 at 03:54:48PM +0200, David Hildenbrand (Arm) wrote:
> On 9/23/26 13:01, Yeoreum Yun wrote:
> > Instead of comparing mem_ops->name to determine whether mem_ops is
> > anon_ops, use the is_anon() helper.
> >
> > Suggested-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
> > ---
> > NOTE:
> > This patch is based on mm/mm-unstable.
> > ---
> > tools/testing/selftests/mm/khugepaged.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
> > index bdc0c7c117d9..b0cb02bf1a73 100644
> > --- a/tools/testing/selftests/mm/khugepaged.c
> > +++ b/tools/testing/selftests/mm/khugepaged.c
> > @@ -618,7 +618,7 @@ static bool wait_for_scan(const char *msg, char *p, size_t len,
> > usleep(TICK);
> > }
> >
> > - if (!strncmp(ops->name, "anon", 4))
> > + if (is_anon(ops))
> > madvise(p, len, MADV_NOHUGEPAGE);
> >
> > return timeout == -1;
>
> This should be squashed in the other patch under review.
Okay. I'll squash with v3.
--
Sincerely,
Yeoreum Yun