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

From: David Laight

Date: Wed Apr 08 2026 - 08:28:07 EST


On Wed, 1 Apr 2026 10:32:30 +0800
Xuewen Yan <xuewen.yan94@xxxxxxxxx> wrote:

> Dear Linux maintainers and reviewers,
>
> I am writing to report a severe scheduling latency issue we recently
> discovered on Linux Kernel 6.12.
>
> Issue Description
>
> We observed that when running a specific background workload pattern,
> certain tasks experience excessive scheduling latency. The delay from
> the runnable state to running on the CPU exceeds 10 seconds, and in
> extreme cases, it reaches up to 100 seconds.

Have you managed to get a low priority process spinning in kernel on the
cpu the RT process last ran on?
The RT process will always run on the same cpu it ran on provided in
is higher priority than the current process running on that cpu.

ftrace logging scheduler events is you 'friend' here.

David

>
> Environment Details
>
> Kernel Version: 6.12.58-android16-6-g3835fd28159d-ab000018-4k
> Architecture: [ ARM64]
> Hardware: T7300
> Config: gki_defconfig
>
> RT-app‘s workload Pattern:
>
> {
> "tasks" : {
> "t0" : {
> "instance" : 40,
> "priority" : 0,
> "cpus" : [ 0, 1, 2, 3 ],
> "taskgroup" : "/background",
> "loop" : -1,
> "run" : 200,
> "sleep" : 50
> }
> }
> }
>
> And we have applied the following patchs:
>
> https://lore.kernel.org/all/20251216111321.966709786@xxxxxxxxxxxxxxxxxxx/
> https://lore.kernel.org/all/20260106170509.413636243@xxxxxxxxxxxxxxxxxxx/
> https://lore.kernel.org/all/20260323134533.805879358@xxxxxxxxxxxxxxxxxxx/
>
>
> Could you please advise if there are known changes in the eevdf in
> 6.12 that might affect this specific workload pattern?
>
> Thanks!
>
> BR
> ---
> xuewen