mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
@ 2026-09-23 11:01 Yeoreum Yun
  2026-09-23 13:54 ` David Hildenbrand (Arm)
  0 siblings, 1 reply; 3+ messages in thread
From: Yeoreum Yun @ 2026-09-23 11:01 UTC (permalink / raw)
  To: linux-mm, linux-kselftest, linux-kernel
  Cc: akpm, david, ziy, baolin.wang, liam, nico.pache, ryan.roberts,
	dev.jain, baohua, lance.yang, usama.arif, kas, ljs, vbabka, rppt,
	surenb, mhocko, shuah, Yeoreum Yun

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@linux.alibaba.com>
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
---
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;
-- 
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
  2026-09-23 11:01 [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test Yeoreum Yun
@ 2026-09-23 13:54 ` David Hildenbrand (Arm)
  2026-09-23 15:20   ` Yeoreum Yun
  0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-23 13:54 UTC (permalink / raw)
  To: Yeoreum Yun, linux-mm, linux-kselftest, linux-kernel
  Cc: akpm, ziy, baolin.wang, liam, nico.pache, ryan.roberts, dev.jain,
	baohua, lance.yang, usama.arif, kas, ljs, vbabka, rppt, surenb,
	mhocko, shuah

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@linux.alibaba.com>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> ---
> 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.

-- 
Cheers,

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
  2026-09-23 13:54 ` David Hildenbrand (Arm)
@ 2026-09-23 15:20   ` Yeoreum Yun
  0 siblings, 0 replies; 3+ messages in thread
From: Yeoreum Yun @ 2026-09-23 15:20 UTC (permalink / raw)
  To: David Hildenbrand (Arm)
  Cc: Yeoreum Yun, linux-mm, linux-kselftest, linux-kernel, akpm, ziy,
	baolin.wang, liam, nico.pache, ryan.roberts, dev.jain, baohua,
	lance.yang, usama.arif, kas, ljs, vbabka, rppt, surenb, mhocko,
	shuah

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@linux.alibaba.com>
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> > ---
> > 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-23 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 11:01 [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test Yeoreum Yun
2026-09-23 13:54 ` David Hildenbrand (Arm)
2026-09-23 15:20   ` Yeoreum Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®