From: Yeoreum Yun <yeoreum.yun@arm.com>
To: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, david@kernel.org, ziy@nvidia.com,
baolin.wang@linux.alibaba.com, liam@infradead.org,
nico.pache@linux.dev, ryan.roberts@arm.com, dev.jain@arm.com,
baohua@kernel.org, lance.yang@linux.dev, usama.arif@linux.dev,
kas@kernel.org, ljs@kernel.org, vbabka@kernel.org,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
shuah@kernel.org, Yeoreum Yun <yeoreum.yun@arm.com>
Subject: [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
Date: Wed, 23 Sep 2026 12:01:33 +0100 [thread overview]
Message-ID: <20260923110133.429745-1-yeoreum.yun@arm.com> (raw)
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}
next reply other threads:[~2026-09-23 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 11:01 Yeoreum Yun [this message]
2026-09-23 13:54 ` [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test David Hildenbrand (Arm)
2026-09-23 15:20 ` Yeoreum Yun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923110133.429745-1-yeoreum.yun@arm.com \
--to=yeoreum.yun@arm.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=kas@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=nico.pache@linux.dev \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox