Skip to content
Commit fc11bc42 authored by Daniel Bristot de Oliveira's avatar Daniel Bristot de Oliveira Committed by Greg Kroah-Hartman
Browse files

rtla/timerlat_aa: Fix negative IRQ delay

[ Upstream commit 6c73daf2 ]

When estimating the IRQ timer delay, we are dealing with two different
clock sources: the external clock source that timerlat uses as a reference
and the clock used by the tracer. There are also two moments: the time
reading the clock and the timer in which the event is placed in the
buffer (the trace event timestamp).

If the processor is slow or there is some hardware noise, the difference
between the timestamp and the external clock, read can be longer than the
IRQ handler delay, resulting in a negative time.

If so, set IRQ to start delay as 0. In the end, it is less near-zero and relevant
then the noise.

Link: https://lore.kernel.org/lkml/a066fb667c7136d86dcddb3c7ccd72587db3e7c7.1691162043.git.bristot@kernel.org

Fixes: 27e348b2

 ("rtla/timerlat: Add auto-analysis core")
Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d0a2cab4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment