[LTP] [PATCH v2] sched_football: synchronize with kickoff flag to reduce skew
Li Wang
liwang@redhat.com
Fri Sep 5 02:54:32 CEST 2025
On Thu, Sep 4, 2025 at 11:28 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > > > > static void do_setup(void)
> > > > > {
> > > > > + if (!tst_check_preempt_rt())
> > > > > + tst_brk(TCONF, "Test requires real-time kernel");
> > > >
> > > > I understood Cyril is really suggesting to keep it [1]. I would also
> > > vote to
> > > > keep it (we still have some time to see if it got fixed before
> release).
> > > >
> > > > I know we had this discussion in the past (some of your colleague
> > > suggesting it
> > > > should not be run on non-RT kernel), so I'm not pushing for it.
> > >
> > > I stil do not understand reasons for disabling the test. The POSIX
> > > realtime schedulling classes have to work properly regardless of the
> > > kernel flavor. Why should we turn the test off on non-rt kernel then?
> > >
> >
> > No special reasons. I still can sporadically catch the failure on non-RT
> > kernel with even sleep 2 seconds.
>
> That is very strange. The SCHED_FIFO threads should preempty any lower
> prio thread as long as they become runable and should stay running until
> they finish or yield. Two seconds should be more than enough for that to
> happen.
>
> > Thus, I took this very extreme approach, because on non-RT kernel, sleep
> > may not have a particularly perfect effect, I guess the stock kernel with
> > sched_setscheduler(, SCHED_FIFO, ) is still has scheduling skew with
> > workload.
>
> Does this happen on vanilla Linux as well or only on RedHat kernels?
>
Yes, both vanilla Linux and CentOS kernels.
more CI test history for sched_football:
Without barrier patch:
Fails on both RT and non-RT CentOS Stream 9/10 kernels
Fails on non-RT mainline v6.17-rc4 kernels. (not build v6.17 RT
kernel)
(^ that's why we started to look into the failure and submit the commit
e523ba88dd9b)
With barrier patch:
Fails on both RT and non-RT CentOS kernels, but the final ball
position is noticeably lower.
Fails on non-RT mainline v6.17-rc4 kernels. (not build v6.17 RT
kernel)
With barrier patch + kickoff flag enhancement:
Fails on the non-RT CentOS Stream 10 kernel
Fails on non-RT mainline v6.17-rc4 kernel. (not build v6.17
RT-kernel)
Passed on RT CentOS stream kernel
(^ here I started to suspect the SCHED_FIFO threads can not perform well
like RT-kernel)
[root@dell-per7625-01 sched_football]# uname -r
6.17.0-rc4.liwang
[root@dell-per7625-01 sched_football]# ./sched_football
tst_test.c:2004: TINFO: LTP version: 20250530
tst_test.c:2007: TINFO: Tested kernel: 6.17.0-rc4.liwang #1 SMP
PREEMPT_DYNAMIC Thu Sep 4 20:07:20 EDT 2025 x86_64
tst_kconfig.c:88: TINFO: Parsing kernel config
'/lib/modules/6.17.0-rc4.liwang/build/.config'
tst_kconfig.c:676: TINFO: CONFIG_FAULT_INJECTION kernel option detected
which might slow the execution
tst_test.c:1825: TINFO: Overall timeout per run is 0h 02m 00s
sched_football.c:162: TINFO: players_per_team: 32 game_length: 5
sched_football.c:178: TINFO: Starting 32 offense threads at priority 15
sched_football.c:185: TINFO: Starting 32 defense threads at priority 30
sched_football.c:192: TINFO: Starting 64 crazy-fan threads at priority 50
sched_football.c:118: TINFO: Starting referee thread
sched_football.c:121: TINFO: Starting the game (5 sec)
sched_football.c:144: TINFO: Final ball position: 20205
sched_football.c:150: TFAIL: Expect: final_ball == 0
Summary:
passed 0
failed 1
broken 0
skipped 0
warnings 0
--
Regards,
Li Wang
More information about the ltp
mailing list