Re: [PATCH v5] sched/stats: Fix rt/dl task's sched latency statistics error in sched_stat_wait tracepoint
From: Daniel Bristot de Oliveira
Date: Fri Jan 12 2024 - 02:39:34 EST
On 1/11/24 16:01, Junwen Wu wrote:
> The sched_stat_wait tracepoint is showing unreasonably long
> latencies for real-time tasks. For example:
>
> sched_stat_wait: comm=rcu_preempt pid=14 delay=4936139545261 [ns]
>
> This error happens when the rt task balances off the source CPU because
> the dequeue operation is not updating the sched_statistics. So, follow
> update_stats_wait_end_fair() and update the stats. Do the same for
> SCHED_DEADLINE.
>
> Fixes: 57a5c2dafca8 ("sched/rt: Support schedstats for RT sched class")
> Fixes: b5eb4a5f6521 ("sched/dl: Support schedstats for deadline sched class")
Reviewed-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
Thanks
-- Daniel