<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/tools/testing/selftests/sched_ext/dequeue_remote.bpf.c, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/tools/testing/selftests/sched_ext/dequeue_remote.bpf.c?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/tools/testing/selftests/sched_ext/dequeue_remote.bpf.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2026-09-30T17:49:52Z</updated>
<entry>
<title>selftests/sched_ext: Add a test for ops.dequeue() on remote local DSQ moves</title>
<updated>2026-09-30T17:49:52Z</updated>
<author>
<name>Kuba Piecuch</name>
<email>jpiecuch@google.com</email>
</author>
<published>2026-09-30T14:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=cc07fae1de5dbf514a9a3978050ee3cf5fe20d3c'/>
<id>urn:sha1:cc07fae1de5dbf514a9a3978050ee3cf5fe20d3c</id>
<content type='text'>
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 &lt;arighi@nvidia.com&gt;
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kuba Piecuch &lt;jpiecuch@google.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
