From: "David Hildenbrand (Arm)" <david@kernel.org>
To: AnishMulay <anishm7030@gmail.com>,
akpm@linux-foundation.org, shuah@kernel.org
Cc: lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: skip migration tests if NUMA is unavailable
Date: Thu, 19 Feb 2026 10:07:24 +0100 [thread overview]
Message-ID: <8a06e724-7def-4c61-b340-ef1b3cd8100b@kernel.org> (raw)
In-Reply-To: <20260218163941.13499-1-anishm7030@gmail.com>
On 2/18/26 17:39, AnishMulay wrote:
> Currently, the migration test asserts that numa_available() returns 0.
> On systems where NUMA is not available (returning -1), such as certain
> ARM64 configurations or single-node systems, this assertion fails and
> crashes the test.
Single-node system (my notebook)
$ ./migration
TAP version 13
1..6
# Starting 6 tests from 1 test cases.
# RUN migration.private_anon ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.private_anon
ok 1 migration.private_anon # SKIP Not enough threads or NUMA nodes
available
# RUN migration.shared_anon ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.shared_anon
ok 2 migration.shared_anon # SKIP Not enough threads or NUMA nodes available
# RUN migration.private_anon_thp ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.private_anon_thp
ok 3 migration.private_anon_thp # SKIP Not enough threads or NUMA nodes
available
# RUN migration.shared_anon_thp ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.shared_anon_thp
ok 4 migration.shared_anon_thp # SKIP Not enough threads or NUMA nodes
available
# RUN migration.private_anon_htlb ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.private_anon_htlb
ok 5 migration.private_anon_htlb # SKIP Not enough threads or NUMA nodes
available
# RUN migration.shared_anon_htlb ...
# SKIP Not enough threads or NUMA nodes available
# OK migration.shared_anon_htlb
ok 6 migration.shared_anon_htlb # SKIP Not enough threads or NUMA nodes
available
# PASSED: 6 / 6 tests passed.
# 6 skipped test(s) detected. Consider enabling relevant config options
to improve coverage.
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:6 error:0
What numa_available() really checks is if the kernel supports NUMA by
trying get_mempolicy(). If that fails with ENOSYS or EPERM.
That should mostly (cases we care about) be the case if the kernel is
compiled without CONFIG_NUMA.
So a better description here would be "On kernels without CONFIG_NUMA,
this assertion ..."
Given that tools/testing/selftests/mm/config does not include
CONFIG_NUMA, I think we want to add here
Fixes: 0c2d08728470b ("mm: add selftests for migration entries")
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
prev parent reply other threads:[~2026-02-19 9:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 16:39 AnishMulay
2026-02-19 1:04 ` SeongJae Park
2026-02-19 4:08 ` Dev Jain
2026-02-19 4:43 ` Anshuman Khandual
2026-02-19 7:25 ` Sayali Patil
2026-02-19 9:07 ` David Hildenbrand (Arm) [this message]
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=8a06e724-7def-4c61-b340-ef1b3cd8100b@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anishm7030@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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