<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/sched_ext/Makefile, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-10-15T16:46:36Z</updated>
<entry>
<title>sched_ext: Add a selftest for scx_bpf_dsq_peek</title>
<updated>2025-10-15T16:46:36Z</updated>
<author>
<name>Ryan Newton</name>
<email>newton@meta.com</email>
</author>
<published>2025-10-15T15:50:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5aff3b319997eb8d0e25b8d2e3b5c88ed07395ac'/>
<id>urn:sha1:5aff3b319997eb8d0e25b8d2e3b5c88ed07395ac</id>
<content type='text'>
This commit adds two tests. The first is the most basic unit test:
make sure an empty queue peeks as empty, and when we put one element
in the queue, make sure peek returns that element.

However, even this simple test is a little complicated by the different
behavior of scx_bpf_dsq_insert in different calling contexts:
 - insert is for direct dispatch in enqueue
 - insert is delayed when called from select_cpu

In this case we split the insert and the peek that verifies the
result between enqueue/dispatch.

Note: An alternative would be to call `scx_bpf_dsq_move_to_local` on an
empty queue, which in turn calls `flush_dispatch_buf`, in order to flush
the buffered insert. Unfortunately, this is not viable within the
enqueue path, as it attempts a voluntary context switch within an RCU
read-side critical section.

The second test is a stress test that performs many peeks on all DSQs
and records the observed tasks.

Signed-off-by: Ryan Newton &lt;newton@meta.com&gt;
Reviewed-by: Christian Loehle &lt;christian.loehle@arm.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/sched_ext: Update test enq_select_cpu_fails</title>
<updated>2025-05-21T17:35:58Z</updated>
<author>
<name>Andrea Righi</name>
<email>arighi@nvidia.com</email>
</author>
<published>2025-05-21T07:34:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36adf6fe6cbe59a22f64c004b201685cb6f38c42'/>
<id>urn:sha1:36adf6fe6cbe59a22f64c004b201685cb6f38c42</id>
<content type='text'>
With commit 08699d20467b6 ("sched_ext: idle: Consolidate default idle
CPU selection kfuncs") allowing scx_bpf_select_cpu_dfl() to be invoked
from multiple contexts, update the test to validate that the kfunc
behaves correctly when used from ops.enqueue() and via BPF test_run.

Additionally, rename the test to enq_select_cpu, dropping "fails" from
the name, as the logic has now been inverted.

Signed-off-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/sched_ext: Add test for scx_bpf_select_cpu_and()</title>
<updated>2025-04-07T17:13:52Z</updated>
<author>
<name>Andrea Righi</name>
<email>arighi@nvidia.com</email>
</author>
<published>2025-04-05T13:39:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01d541baedd74530831c8c98b946622cb7487f30'/>
<id>urn:sha1:01d541baedd74530831c8c98b946622cb7487f30</id>
<content type='text'>
Add a selftest to validate the behavior of the built-in idle CPU
selection policy applied to a subset of allowed CPUs, using
scx_bpf_select_cpu_and().

Signed-off-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/sched_ext: Add NUMA-aware scheduler test</title>
<updated>2025-02-26T18:49:02Z</updated>
<author>
<name>Andrea Righi</name>
<email>arighi@nvidia.com</email>
</author>
<published>2025-02-26T06:50:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ae5161820e5c21e85a905a1f47e8f28e5042bf5'/>
<id>urn:sha1:5ae5161820e5c21e85a905a1f47e8f28e5042bf5</id>
<content type='text'>
Add a selftest to validate the behavior of the NUMA-aware scheduler
functionalities, including idle CPU selection within nodes, per-node
DSQs and CPU to node mapping.

Signed-off-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ</title>
<updated>2024-10-23T18:56:32Z</updated>
<author>
<name>Ihor Solodrai</name>
<email>ihor.solodrai@pm.me</email>
</author>
<published>2024-10-21T23:16:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9b3c11a867a82ebee4e096008014417918b82801'/>
<id>urn:sha1:9b3c11a867a82ebee4e096008014417918b82801</id>
<content type='text'>
The runner.o may start building before libbpf headers are installed,
and as a result build fails. This happened a couple of times on
libbpf/ci test jobs:
  * https://github.com/libbpf/ci/actions/runs/11447667257/job/31849533100
  * https://github.com/theihor/libbpf-ci/actions/runs/11445162764/job/31841649552

Headers are installed in a recipe for $(BPFOBJ) target, and adding an
order-only dependency should ensure this doesn't happen.

Signed-off-by: Ihor Solodrai &lt;ihor.solodrai@pm.me&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: sched_ext: Add sched_ext as proper selftest target</title>
<updated>2024-10-09T16:42:51Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn@rivosinc.com</email>
</author>
<published>2024-10-08T15:35:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7941b83bceb374c7e81061e0ebb45cd45f3e3517'/>
<id>urn:sha1:7941b83bceb374c7e81061e0ebb45cd45f3e3517</id>
<content type='text'>
The sched_ext selftests is missing proper cross-compilation support, a
proper target entry, and out-of-tree build support.

When building the kselftest suite, e.g.:

  make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-  \
    TARGETS=sched_ext SKIP_TARGETS="" O=/output/foo \
    -C tools/testing/selftests install

or:

  make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \
    O=/output/foo -C tools/testing/selftests install

The expectation is that the sched_ext is included, cross-built, the
correct toolchain is picked up, and placed into /output/foo.

In contrast to the BPF selftests, the sched_ext suite does not use
bpftool at test run-time, so it is sufficient to build bpftool for the
build host only.

Add ARCH, CROSS_COMPILE, OUTPUT, and TARGETS support to the sched_ext
selftest. Also, remove some variables that were unused by the
Makefile.

Signed-off-by: Björn Töpel &lt;bjorn@rivosinc.com&gt;
Reviewed-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Tested-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched_ext: Add selftests</title>
<updated>2024-06-18T20:09:21Z</updated>
<author>
<name>David Vernet</name>
<email>dvernet@meta.com</email>
</author>
<published>2024-06-18T20:09:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a5db7817af780db6a7f290c79677eff4fd13c5fa'/>
<id>urn:sha1:a5db7817af780db6a7f290c79677eff4fd13c5fa</id>
<content type='text'>
Add basic selftests.

Signed-off-by: David Vernet &lt;dvernet@meta.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
