[REGRESSION] 6.12.y: d66792919d4f (sched/deadline: Use revised wakeup rule for dl_server) causes latencies up to 50ms with PREEMPT_RT

Lukas Beckmann <[email protected]>
Newsgroups dev.linux.lists.regressions,org.kernel.vger.linux-rt-users,org.kernel.vger.stable
Message-ID <[email protected]>
Hi,

I am reporting a regression which was introduced by d66792919d4f on 6.12.y.
Since this commit, cyclictest reports latencies up to 50 milliseconds, 
on kernels with CONFIG_PREEMPT_RT=y.

Steps to reproduce:
1. run a load (e.g. stress-ng --cpu 4 --io 2 --vm 2 --vm-bytes 128M)
2. run cyclictest (e.g. cyclictest -a -t -m -p 80 -i 250 -d 0)

cyclictest results on the current linux-6.12.y branch (tag v6.12.87):
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 9.37 9.21 6.90 9/211 978
T: 0 ( 884) P:80 I:250 C:4688252 Min: 3 Act: 6 Avg: 6 Max: 51956
T: 1 ( 885) P:80 I:250 C:4688051 Min: 3 Act: 7 Avg: 6 Max: 50106
T: 2 ( 886) P:80 I:250 C:4688242 Min: 3 Act: 6 Avg: 6 Max: 51965
T: 3 ( 887) P:80 I:250 C:4688434 Min: 3 Act: 12 Avg: 8 Max: 59

cyclictest results on 6.12.y with d66792919d4f reverted:
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 9.43 9.50 9.44 8/204 5758
T: 0 ( 862) P:80 I:250 C:272329322 Min: 3 Act: 6 Avg: 6 Max: 57
T: 1 ( 863) P:80 I:250 C:272329324 Min: 3 Act: 7 Avg: 6 Max: 77
T: 2 ( 864) P:80 I:250 C:272329322 Min: 3 Act: 7 Avg: 6 Max: 68
T: 3 ( 865) P:80 I:250 C:272329322 Min: 3 Act: 16 Avg: 7 Max: 81

This is reproducible on multiple machines.

It looks like the timer fires and there is also a sched_waking event in 
the trace, but the cyclictest thread does not get scheduled for another 
50ms.

I found this, because Debian updated its rt kernel from 6.12.74 to 6.12.85.
The issue was also present with upstream 6.12.85 and HEAD, but not with 
6.12.74, so I started bisecting and eventually found d66792919d4f.

Is it possible to revert the commit?

I can provide traces or help with testing if needed.

Thanks
Lukas Beckmann

#regzbot introduced: d66792919d4f
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.