summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorWenwu Hou <hwenwur@gmail.com>2026-11-16 11:21:56 +0800
committerSteven Rostedt <rostedt@goodmis.org>2026-11-20 10:02:37 -0500
commit210bc23d47088f4962df85a807b05c5c8fc99215 (patch)
tree09bb74313bb4776fd183a9e797ba956137fa01dd /rust/kernel
parent1382c57e40b3885614dba4bd53b65b21aec2e874 (diff)
tracing/hwlat: Do the latency calculations in nanoseconds
tr->max_latency is expected to hold nanoseconds: tracing_max_lat_read() converts it with nsecs_to_usecs() to print the usecs documented in hwlat_detector.rst, and the other latency tracers store nanoseconds there too. Do all the latency calculations in nanoseconds instead, and only convert the durations to microseconds when recording the hwlat event. This also makes the backward-clock error paths reachable. Previously, time_to_us() passed the delta through unsigned div_u64(), so a negative delta became a positive value after division. These error paths jumped to out without clearing trace_hwlat_callback_enabled. Fix this as well. Link: https://patch.msgid.link/20261116032156.3138060-1-hwenwur@gmail.com Fixes: e7c15cd8a1133 ("tracing: Added hardware latency tracer") Fixes: 7b2c86250122d ("tracing: Add NMI tracing in hwlat detector") Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Wenwu Hou <hwenwur@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions