Re: [PATCH sched_ext/for-6.13-fixes] sched_ext: Fix dsq_local_on selftest

From: Ihor Solodrai
Date: Wed Jan 15 2025 - 18:50:54 EST


On Tuesday, December 24th, 2024 at 4:09 PM, Tejun Heo <tj@xxxxxxxxxx> wrote:

>
>
> The dsp_local_on selftest expects the scheduler to fail by trying to
> schedule an e.g. CPU-affine task to the wrong CPU. However, this isn't
> guaranteed to happen in the 1 second window that the test is running.
> Besides, it's odd to have this particular exception path tested when there
> are no other tests that verify that the interface is working at all - e.g.
> the test would pass if dsp_local_on interface is completely broken and fails
> on any attempt.
>
> Flip the test so that it verifies that the feature works. While at it, fix a
> typo in the info message.
>
> Signed-off-by: Tejun Heo tj@xxxxxxxxxx
>
> Reported-by: Ihor Solodrai ihor.solodrai@xxxxx
>
> Link: http://lkml.kernel.org/r/Z1n9v7Z6iNJ-wKmq@xxxxxxxxxxxxxxx
> ---
> tools/testing/selftests/sched_ext/dsp_local_on.bpf.c | 5 ++++-
> tools/testing/selftests/sched_ext/dsp_local_on.c | 5 +++--
> 2 files changed, 7 insertions(+), 3 deletions(-)

Hi Tejun.

I've tried running sched_ext selftests on BPF CI today, applying a set
of patches from sched_ext/for-6.13-fixes, including this one.

You can see the list of patches I added here:
https://github.com/kernel-patches/vmtest/pull/332/files

With that, dsq_local_on has failed on x86_64 (llvm-18), although it
passed with other configurations:
https://github.com/kernel-patches/vmtest/actions/runs/12798804552/job/35683769806

Here is a piece of log that appears to be relevant:

2025-01-15T23:28:55.8238375Z [ 5.334631] sched_ext: BPF scheduler "dsp_local_on" disabled (runtime error)
2025-01-15T23:28:55.8243034Z [ 5.335420] sched_ext: dsp_local_on: SCX_DSQ_LOCAL[_ON] verdict target cpu 1 not allowed for kworker/u8:1[33]
2025-01-15T23:28:55.8246187Z [ 5.336139] dispatch_to_local_dsq+0x13e/0x1f0
2025-01-15T23:28:55.8249296Z [ 5.336474] flush_dispatch_buf+0x13d/0x170
2025-01-15T23:28:55.8252083Z [ 5.336793] balance_scx+0x225/0x3e0
2025-01-15T23:28:55.8254695Z [ 5.337065] __schedule+0x406/0xe80
2025-01-15T23:28:55.8257121Z [ 5.337330] schedule+0x41/0xb0
2025-01-15T23:28:55.8260146Z [ 5.337574] schedule_timeout+0xe5/0x160
2025-01-15T23:28:55.8263080Z [ 5.337875] rcu_tasks_kthread+0xb1/0xc0
2025-01-15T23:28:55.8265477Z [ 5.338169] kthread+0xfa/0x120
2025-01-15T23:28:55.8268202Z [ 5.338410] ret_from_fork+0x37/0x50
2025-01-15T23:28:55.8271272Z [ 5.338690] ret_from_fork_asm+0x1a/0x30
2025-01-15T23:28:56.7349562Z ERR: dsp_local_on.c:39
2025-01-15T23:28:56.7350182Z Expected skel->data->uei.kind == EXIT_KIND(SCX_EXIT_UNREG) (1024 == 64)

Could you please take a look?

Thank you.

>
> [...]