| #
3521f92d |
| 30-Sep-2026 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Test scx_bpf_cgroup_nr_cpus()
Verify that scx_bpf_cgroup_nr_cpus() reports the number of CPUs in a cgroup's effective cpuset.
Create a cgroup-v2 subtree where a child owns a cp
selftests/sched_ext: Test scx_bpf_cgroup_nr_cpus()
Verify that scx_bpf_cgroup_nr_cpus() reports the number of CPUs in a cgroup's effective cpuset.
Create a cgroup-v2 subtree where a child owns a cpuset and a leaf inherits it. Sample the kfunc from a BPF_PROG_TYPE_SYSCALL program and compare it with cpuset.cpus.effective for the root, the cpuset owner and the inheriting leaf, without a scheduler attached. Attach a scheduler and verify the value observed from ops.cgroup_init(). Then restrict the child's cpuset to a non-contiguous and a single-CPU set, and finally disable cpuset below the parent so that both cgroups inherit the parent's cpuset.
A disabled cpuset css stays attached to its cgroup until it is asynchronously offlined, so poll briefly for the last step. Skip the test when the required controllers or two CPUs are unavailable.
Assisted-by: LLM Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
972cf7de |
| 30-Sep-2026 |
Tejun Heo <tj@kernel.org> |
sched_ext: Merge branch 'for-7.3-fixes' into for-7.4
Pull to receive cc07fae1de5d ("selftests/sched_ext: Add a test for ops.dequeue() on remote local DSQ moves") and resolve its conflict with f73ec6
sched_ext: Merge branch 'for-7.3-fixes' into for-7.4
Pull to receive cc07fae1de5d ("selftests/sched_ext: Add a test for ops.dequeue() on remote local DSQ moves") and resolve its conflict with f73ec6791424 ("sched_ext: Add selftest for blocked donor admission") here so that for-next merges clean.
Conflicts: kept both auto-test-targets entries in the selftests Makefile, where each side added one after dequeue_iter.
Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
cc07fae1 |
| 30-Sep-2026 |
Kuba Piecuch <jpiecuch@google.com> |
selftests/sched_ext: Add a test for ops.dequeue() on remote local DSQ moves
Add a dequeue_remote test that makes moves of tasks in the BPF scheduler's custody to another CPU's local DSQ the common c
selftests/sched_ext: Add a test for ops.dequeue() on remote local DSQ moves
Add a dequeue_remote test that makes moves of tasks in the BPF scheduler's custody to another CPU's local DSQ the common case, both via SCX_DSQ_LOCAL_ON dispatch and via scx_bpf_dsq_move_to_local(). The BPF scheduler tracks each task's custody state and triggers scx_bpf_error() if a custody period doesn't end with exactly one ops.dequeue() before the task runs, or if it ends with an SCX_DEQ_CORE_SCHED_EXEC dequeue of a task without a core cookie.
Without the previous patch, the test fails with:
sched_ext: dequeue_remote: dequeue_remote.bpf.c:141: 15 (rcu_preempt): late ops.dequeue() with SCX_DEQ_CORE_SCHED_EXEC (enq_cpu=3 cpu=2 seq=1) ... ops_dequeue+0x114/0x170 set_next_task_scx+0x104/0x1e0 __pick_next_task+0xc7/0x180 __schedule+0x154/0x1870
Reviewed-by: Andrea Righi <arighi@nvidia.com> Assisted-by: Claude:claude-opus-5.5 Signed-off-by: Kuba Piecuch <jpiecuch@google.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
f73ec679 |
| 22-Sep-2026 |
Andrea Righi <arighi@nvidia.com> |
sched_ext: Add selftest for blocked donor admission
SCX_OPS_ENQ_BLOCKED allows BPF schedulers to receive blocked proxy donors through ops.enqueue(). SCX_ENQ_BLOCKED identifies blocked-donor admissio
sched_ext: Add selftest for blocked donor admission
SCX_OPS_ENQ_BLOCKED allows BPF schedulers to receive blocked proxy donors through ops.enqueue(). SCX_ENQ_BLOCKED identifies blocked-donor admission requests. Add selftest coverage for this interface.
Exercise a priority inversion using a weighted-vruntime BPF scheduler. A nice +19 owner holds a shared mutex, a nice -20 donor blocks on it, and nice 0 CPU contenders, one per allowed CPU, keep the system busy. Test both a same-CPU topology and a cross-CPU topology with the donor and owner on different CPUs.
Treat blocked donors according to the normal BPF ordering policy and assign the default slice on every enqueue, as for other tasks. Run each CPU placement configuration with SCX_OPS_ENQ_BLOCKED first disabled and then enabled, count blocked-donor enqueues by CPU and report average mutex hold and wait times. Verify that full wakeups are never reported as blocked-donor admissions by checking that SCX_ENQ_WAKEUP and SCX_ENQ_BLOCKED are not set together.
Proxy execution coverage requires CONFIG_SCHED_PROXY_EXEC=y, which the selftest config selects. Access to the kernel mutex is provided via a loadable kernel module, built through TEST_GEN_MODS_DIR and managed by the test.
Acked-by: John Stultz <jstultz@google.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
e3d53f83 |
| 26-Sep-2026 |
Tejun Heo <tj@kernel.org> |
sched_ext: Merge branch 'for-7.3-fixes' into for-7.4
Pull to receive 94480606a677 ("sched_ext: Add a size argument to scx_bpf_cid_topo() so struct scx_cid_topo can grow") for the upcoming cluster le
sched_ext: Merge branch 'for-7.3-fixes' into for-7.4
Pull to receive 94480606a677 ("sched_ext: Add a size argument to scx_bpf_cid_topo() so struct scx_cid_topo can grow") for the upcoming cluster level.
Conflicts: kept both declarations where 5cadf7545cc6 ("sched_ext: Add a CID NUMA node lookup kfunc") added one next to the changed scx_bpf_cid_topo() line, and pointed 29871903f3a3 ("sched_ext: Don't deliver duplicate ops.cgroup_set_idle() for same value") at the renamed tg->scx.sched_idle.
Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
d781d1b7 |
| 19-Sep-2026 |
Tejun Heo <tj@kernel.org> |
selftests/sched_ext: Check the cmask cid-form ops.enable() receives
cid-form ops.enable() now hands the task's cmask to the scheduler and set_cmask() repeats it right after. Add a cid-form selftest
selftests/sched_ext: Check the cmask cid-form ops.enable() receives
cid-form ops.enable() now hands the task's cmask to the scheduler and set_cmask() repeats it right after. Add a cid-form selftest that checks both against p->cpus_ptr, that they match each other, that the initial set_cmask() lands before set_weight() and before the task first becomes runnable, and that set_cmask() never precedes enable(), across class-switch enables, fork-path enables and live affinity changes.
v2: Mismatch details returned through a caller-local struct instead of globals, alloc_words validated in the header check, loop bounded by nr_cids directly (Andrea Righi).
Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
ed7d9689 |
| 18-Sep-2026 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Add lazy preemption tests
Add trace-based coverage for immediate and lazy preemption. An fexit probe on __resched_curr() records the requested TIF after the current task's slice
selftests/sched_ext: Add lazy preemption tests
Add trace-based coverage for immediate and lazy preemption. An fexit probe on __resched_curr() records the requested TIF after the current task's slice is cleared. SCX_OPS_ENQ_LAST drives the victim through ops.stopping() without relying on an unrelated wakeup.
Exercise kick requests individually, in both orders and combined in one call. Verify that immediate preemption and WAIT take precedence over lazy preemption, and that combining immediate and lazy enqueue preemption follows the same rule. Also test overriding the persistent policy in both directions through scx_bpf_task_set_lazy_resched(), and add invalid kick flag coverage.
Extend the NO_HZ_FULL test with infinite-slice victims. Wait until the scheduler tick is observed to stop, then verify that lazy enqueue and kick requests restart it and make forward progress. Move the controller off all NO_HZ_FULL CPUs and increase the phase and watchdog timeouts to tolerate scheduling delays in oversubscribed test VMs.
Detect both dynamic and static kernel preemption modes and skip mode-sensitive assertions when the active mode is unavailable. Skip trace-based cases when their kernel BTF targets are unavailable, while allowing the independent invalid-flag cases to run.
Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
9ec7ba20 |
| 17-Sep-2026 |
fangqiurong <fangqiurong@kylinos.cn> |
selftests/sched_ext: Test that ops.dequeue() can iterate the consumed DSQ
Add a scheduler whose ops.dequeue() iterates the source user DSQ with bpf_iter_scx_dsq. The iteration takes the DSQ's raw sp
selftests/sched_ext: Test that ops.dequeue() can iterate the consumed DSQ
Add a scheduler whose ops.dequeue() iterates the source user DSQ with bpf_iter_scx_dsq. The iteration takes the DSQ's raw spinlock; on a kernel that runs ops.dequeue() while the consume path still holds that lock, the first task consumed self-deadlocks the CPU with IRQs disabled. The watchdog cannot recover from that state, so on an unfixed kernel this test wedges the system instead of failing cleanly. On a fixed kernel the scheduler runs clean and the test passes.
Signed-off-by: fangqiurong <fangqiurong@kylinos.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
60204f77 |
| 09-Sep-2026 |
Cheng-Yang Chou <yphbchou0911@gmail.com> |
selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS
CFLAGS passes the link-time flag -rdynamic to compile steps ($(CC) -c), where it is unused. Under -Werror, Clang fails the build:
selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS
CFLAGS passes the link-time flag -rdynamic to compile steps ($(CC) -c), where it is unused. Under -Werror, Clang fails the build:
$ make CC=clang-21 clang-21: error: argument unused during compilation: '-rdynamic' [-Werror,-Wunused-command-line-argument]
Nothing needs the exported symbols. Separately, LDFLAGS uses '=' rather than '+=', discarding USERLDFLAGS from lib.mk.
Drop -rdynamic and append LDFLAGS with '+='. This fixes builds with CC=clang-N while preserving USERLDFLAGS.
v2: Drop -rdynamic instead of moving it to LDFLAGS (Tejun Heo).
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
cfe950d7 |
| 08-Jul-2026 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Verify nohz_full tick behavior
Finite-slice EXT tasks need the periodic scheduler tick to expire their slices even when nohz_full is enabled.
Add a regression test that selects
selftests/sched_ext: Verify nohz_full tick behavior
Finite-slice EXT tasks need the periodic scheduler tick to expire their slices even when nohz_full is enabled.
Add a regression test that selects a nohz_full CPU and exercises both infinite-to-finite and finite-to-finite slice transitions across an idle interval. For each finite task, verify that its ops.tick() callback is invoked.
Skip the test when an allowed nohz_full CPU and a separate housekeeping CPU are not available.
Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
5897ca15 |
| 20-Apr-2026 |
Cheng-Yang Chou <yphbchou0911@gmail.com> |
selftests/sched_ext: Add non_scx_kfunc_deny test
Verify that the BPF verifier rejects a non-SCX struct_ops program (tcp_congestion_ops) that attempts to call an SCX kfunc (scx_bpf_kick_cpu). The tes
selftests/sched_ext: Add non_scx_kfunc_deny test
Verify that the BPF verifier rejects a non-SCX struct_ops program (tcp_congestion_ops) that attempts to call an SCX kfunc (scx_bpf_kick_cpu). The test expects the load to fail with -EACCES from scx_kfunc_context_filter.
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
94555ca6 |
| 30-Mar-2026 |
Tejun Heo <tj@kernel.org> |
Merge branch 'for-7.0-fixes' into for-7.1
Conflict in kernel/sched/ext.c init_sched_ext_class() between:
415cb193bb97 ("sched_ext: Fix SCX_KICK_WAIT deadlock by deferring wait to balance callba
Merge branch 'for-7.0-fixes' into for-7.1
Conflict in kernel/sched/ext.c init_sched_ext_class() between:
415cb193bb97 ("sched_ext: Fix SCX_KICK_WAIT deadlock by deferring wait to balance callback")
which adds cpus_to_sync cpumask allocation, and:
84b1a0ea0b7c ("sched_ext: Implement scx_bpf_dsq_reenq() for user DSQs") 8c1b9453fde6 ("sched_ext: Convert deferred_reenq_locals from llist to regular list")
which add deferred_reenq init code at the same location. Both are independent additions. Include both.
Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
090d34f0 |
| 29-Mar-2026 |
Tejun Heo <tj@kernel.org> |
selftests/sched_ext: Add cyclic SCX_KICK_WAIT stress test
Add a test that creates a 3-CPU kick_wait cycle (A->B->C->A). A BPF scheduler kicks the next CPU in the ring with SCX_KICK_WAIT on every enq
selftests/sched_ext: Add cyclic SCX_KICK_WAIT stress test
Add a test that creates a 3-CPU kick_wait cycle (A->B->C->A). A BPF scheduler kicks the next CPU in the ring with SCX_KICK_WAIT on every enqueue while userspace workers generate continuous scheduling churn via sched_yield(). Without the preceding fix, this hangs the machine within seconds.
Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christian Loehle <christian.loehle@arm.com> Tested-by: Christian Loehle <christian.loehle@arm.com>
show more ...
|
| #
c6f99d0e |
| 27-Mar-2026 |
Tejun Heo <tj@kernel.org> |
Revert "selftests/sched_ext: Add tests for SCX_ENQ_IMMED and scx_bpf_dsq_reenq()"
This reverts commit c50dcf533149.
The tests are superficial, likely AI-generated slop, and flaky. They don't add ac
Revert "selftests/sched_ext: Add tests for SCX_ENQ_IMMED and scx_bpf_dsq_reenq()"
This reverts commit c50dcf533149.
The tests are superficial, likely AI-generated slop, and flaky. They don't add actual value and just churn the selftests.
Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
c50dcf53 |
| 22-Mar-2026 |
zhidao su <suzhidao@xiaomi.com> |
selftests/sched_ext: Add tests for SCX_ENQ_IMMED and scx_bpf_dsq_reenq()
Add three selftests covering features introduced in v7.1:
- dsq_reenq: Verify scx_bpf_dsq_reenq() on user DSQs triggers op
selftests/sched_ext: Add tests for SCX_ENQ_IMMED and scx_bpf_dsq_reenq()
Add three selftests covering features introduced in v7.1:
- dsq_reenq: Verify scx_bpf_dsq_reenq() on user DSQs triggers ops.enqueue() with SCX_ENQ_REENQ and SCX_TASK_REENQ_KFUNC in p->scx.flags.
- enq_immed: Verify SCX_OPS_ALWAYS_ENQ_IMMED slow path where tasks dispatched to a busy CPU's local DSQ are re-enqueued through ops.enqueue() with SCX_TASK_REENQ_IMMED.
- consume_immed: Verify SCX_ENQ_IMMED via the consume path using scx_bpf_dsq_move_to_local___v2() with explicit SCX_ENQ_IMMED.
All three tests skip gracefully on kernels that predate the required features by checking availability via __COMPAT_has_ksym() / __COMPAT_read_enum() before loading.
Signed-off-by: zhidao su <suzhidao@xiaomi.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
32e940f2 |
| 06-Mar-2026 |
Tejun Heo <tj@kernel.org> |
Merge branch 'for-7.0-fixes' into for-7.1
To prepare for hierarchical scheduling patchset which will cause multiple conflicts otherwise.
Signed-off-by: Tejun Heo <tj@kernel.org>
|
| #
01a867c2 |
| 03-Mar-2026 |
Zhao Mengmeng <zhaomengmeng@kylinos.cn> |
selftests/sched_ext: Add -fms-extensions to bpf build flags
Similar to commit 835a50753579 ("selftests/bpf: Add -fms-extensions to bpf build flags") and commit 639f58a0f480 ("bpftool: Fix build warn
selftests/sched_ext: Add -fms-extensions to bpf build flags
Similar to commit 835a50753579 ("selftests/bpf: Add -fms-extensions to bpf build flags") and commit 639f58a0f480 ("bpftool: Fix build warnings due to MS extensions")
Fix "declaration does not declare anything" warning by using -fms-extensions and -Wno-microsoft-anon-tag flags to build bpf programs that #include "vmlinux.h"
Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn> Reviewed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
658ad225 |
| 21-Feb-2026 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Add test to validate ops.dequeue() semantics
Add a new kselftest to validate that the new ops.dequeue() semantics work correctly for all task lifecycle scenarios, including the
selftests/sched_ext: Add test to validate ops.dequeue() semantics
Add a new kselftest to validate that the new ops.dequeue() semantics work correctly for all task lifecycle scenarios, including the distinction between terminal DSQs (where BPF scheduler is done with the task), user DSQs (where BPF scheduler manages the task lifecycle) and BPF data structures, regardless of which event performs the dispatch.
The test validates the following scenarios:
- From ops.select_cpu(): - scenario 0 (local DSQ): tasks dispatched to the local DSQ bypass the BPF scheduler entirely; they never enter BPF custody, so ops.dequeue() is not called, - scenario 1 (global DSQ): tasks dispatched to SCX_DSQ_GLOBAL also bypass the BPF scheduler, like the local DSQ; ops.dequeue() is not called, - scenario 2 (user DSQ): tasks dispatched to user DSQs from ops.select_cpu(): tasks enter BPF scheduler's custody with full enqueue/dequeue lifecycle tracking and state machine validation, expects 1:1 enqueue/dequeue pairing,
- From ops.enqueue(): - scenario 3 (local DSQ): same behavior as scenario 0, - scenario 4 (global DSQ): same behavior as scenario 1, - scenario 5 (user DSQ): same behavior as scenario 2, - scenario 6 (BPF internal queue): tasks are stored in a BPF queue from ops.enqueue() and consumed from ops.dispatch(); similarly to scenario 5, tasks enter BPF scheduler's custody with full lifecycle tracking and 1:1 enqueue/dequeue validation.
This verifies that: - terminal DSQ dispatch (local, global) don't trigger ops.dequeue(), - tasks dispatched to user DSQs, either from ops.select_cpu() or ops.enqueue(), enter BPF scheduler's custody and have exact 1:1 enqueue/dequeue pairing, - tasks stored to internal BPF data structures from ops.enqueue() enter BPF scheduler's custody and have exact 1:1 enqueue/dequeue pairing, - dispatch dequeues have no flags (normal workflow), - property change dequeues have the %SCX_DEQ_SCHED_CHANGE flag set, - no duplicate enqueues or invalid state transitions are happening.
Cc: Tejun Heo <tj@kernel.org> Cc: Emil Tsalapatis <emil@etsalapatis.com> Cc: Kuba Piecuch <jpiecuch@google.com> Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
dd6a37e8 |
| 26-Jan-2026 |
Joel Fernandes <joelagnelf@nvidia.com> |
selftests/sched_ext: Add test for DL server total_bw consistency
Add a new kselftest to verify that the total_bw value in /sys/kernel/debug/sched/debug remains consistent across all CPUs under diffe
selftests/sched_ext: Add test for DL server total_bw consistency
Add a new kselftest to verify that the total_bw value in /sys/kernel/debug/sched/debug remains consistent across all CPUs under different sched_ext BPF program states:
1. Before a BPF scheduler is loaded 2. While a BPF scheduler is loaded and active 3. After a BPF scheduler is unloaded
The test runs CPU stress threads to ensure DL server bandwidth values stabilize before checking consistency. This helps catch potential issues with DL server bandwidth accounting during sched_ext transitions.
Co-developed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20260126100050.3854740-8-arighi@nvidia.com
show more ...
|
| #
be621a76 |
| 26-Jan-2026 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Add test for sched_ext dl_server
Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class.
Co-developed-by: Joel Fernandes <joelagnelf@nvi
selftests/sched_ext: Add test for sched_ext dl_server
Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class.
Co-developed-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Tested-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20260126100050.3854740-7-arighi@nvidia.com
show more ...
|
| #
5aff3b31 |
| 15-Oct-2025 |
Ryan Newton <newton@meta.com> |
sched_ext: Add a selftest for scx_bpf_dsq_peek
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, m
sched_ext: Add a selftest for scx_bpf_dsq_peek
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 <newton@meta.com> Reviewed-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
36adf6fe |
| 21-May-2025 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Update test enq_select_cpu_fails
With commit 08699d20467b6 ("sched_ext: idle: Consolidate default idle CPU selection kfuncs") allowing scx_bpf_select_cpu_dfl() to be invoked fro
selftests/sched_ext: Update test enq_select_cpu_fails
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 <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
01d541ba |
| 05-Apr-2025 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Add test for scx_bpf_select_cpu_and()
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
selftests/sched_ext: Add test for scx_bpf_select_cpu_and()
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 <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
5ae51618 |
| 26-Feb-2025 |
Andrea Righi <arighi@nvidia.com> |
selftests/sched_ext: Add NUMA-aware scheduler test
Add a selftest to validate the behavior of the NUMA-aware scheduler functionalities, including idle CPU selection within nodes, per-node DSQs and C
selftests/sched_ext: Add NUMA-aware scheduler test
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 <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|
| #
9b3c11a8 |
| 22-Oct-2024 |
Ihor Solodrai <ihor.solodrai@pm.me> |
selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ
The runner.o may start building before libbpf headers are installed, and as a result build fails. This happened a couple of times
selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ
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 <ihor.solodrai@pm.me> Signed-off-by: Tejun Heo <tj@kernel.org>
show more ...
|