Re: [PATCH 2/2] selftests/sched_ext: Add cyclic SCX_KICK_WAIT stress test

Cheng-Yang Chou
2026-03-30T04:40:20Z

Hi Andrea,

On Sun, Mar 29, 2026 at 05:52:12PM +0200, Andrea Righi wrote:
> Hi Cheng-Yang,
>
> On Sun, Mar 29, 2026 at 05:06:20PM +0800, Cheng-Yang Chou wrote:
> > Hi Tejun,
> >
> > On Sat, Mar 28, 2026 at 02:18:56PM -1000, Tejun Heo wrote:
> > > 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.
> >
> > I think it would be better to skip this test on older, unpatched kernels.
> > Sometimes I use my local kernel for testing before the stable patches are
> > fully integrated, so skipping the test would be a safer approach.
> >
> > Otherwise, this test can stall the machine and make it impossible to
> > exit the test runner.
>
> Actually, I disagree. The whole point of the kselftests is to expose kernel
> issues, including bugs in older kernels that may need fixes. So, I think we
> shouldn't skip the test.

I see your point. While the system stall is a bit painful during local
machine testing on unpatched kernels, I agree that kselftests should
remain an effective gatekeeper for kernel issues.

Or maybe return SCX_TEST_FAIL?

Since without this patch, this test won't pass anyway. Perhaps failing
more gracefully is a better middle ground than stalling the entire machine.

--
Thanks,
Cheng-Yang