Re: [Question] Sched: Severe scheduling latency (>10s) observed on kernel 6.12 with specific workload

From: Xuewen Yan

Date: Tue Apr 07 2026 - 22:50:25 EST


Hi Dietmar and Vincent,


>
> I tried to recreate your env as much as possible on qemu and ran your
> rt-app file but I can't spot anything suspicious either. This is with
> defconfig and cgroupv2.

Could you please try the following configuration?
To rule out Android's influence, I created two new cgroups:
foreground_test and background_test.
I then placed only rt-app threads into these groups. Even with this
setup, we can still observe high scheduling latency for tasks in
foreground_test.

{
"tasks" : {
"t0" : {
"instance" : 40,
"priority" : 0,
"cpus" : [ 0, 1, 2, 3 ],
"taskgroup" : "/background_test",
"loop" : -1,
"run" : 200,
"sleep" : 50
},
"t1" : {
"instance" : 2,
"priority" : 19,
"cpus" : [ 0, 1, 2, 3 ],
"taskgroup" : "/foreground_test",
"loop" : -1,
"run" : 60000,
"sleep" : 100000
},
"t2" : {
"instance" : 2,
"priority" : 10,
"cpus" : [ 0, 1, 2, 3 ],
"taskgroup" : "/foreground_test",
"loop" : -1,
"run" : 5000,
"sleep" : 100000
}
}
}


Thanks!

BR
---
xuewen

>
> $ cat /sys/devices/system/cpu/cpu*/cpu_capacity
> 512
> 512
> 512
> 512
> 512
> 512
> 1024
> 1024
>
> 10 highest wu_lat values:
>
> v6.6
>
> 0.024601000 task0-9:881
> 0.019151000 task0-13:885
> 0.018344000 task0-27:899
> 0.017332000 task0-5:876
> 0.010613000 task0-21:893
> 0.010356000 task0-20:892
> 0.007796000 task0-15:887
> 0.007550000 task0-13:885
> 0.007292000 task0-2:872
> 0.006718000 task0-15:887
>
> 6.12.58
>
> 0.029507000 task0-32:1211
> 0.027374000 task0-37:1216
> 0.027294000 task0-12:1191
> 0.027063000 task0-11:1190
> 0.026612000 task0-28:1207
> 0.024829000 task0-38:1217
> 0.024472000 task0-18:1197
> 0.024396000 task0-34:1213
> 0.024303000 task0-10:1189
> 0.023317000 task0-26:1205
>
> tip sched/core (7.0.0-rc4-00030-g265439eb88fd)
>
> 0.025000000 task0-32:851
> 0.020467000 task0-5:824
> 0.017190000 task0-16:835
> 0.015365000 task0-8:827
> 0.011591000 task0-32:851
> 0.010153000 task0-34:853
> 0.009932000 task0-4:823
> 0.008972000 task0-24:843
> 0.008564000 task0-39:858
> 0.007591000 task0-25:844