linux/tools
Wang Yaxin 503efe850c delayacct: add timestamp of delay max
Problem
=======
Commit 658eb5ab91 ("delayacct: add delay max to record delay peak")
introduced the delay max for getdelays, which records abnormal latency
peaks and helps us understand the magnitude of such delays.  However, the
peak latency value alone is insufficient for effective root cause
analysis.  Without the precise timestamp of when the peak occurred, we
still lack the critical context needed to correlate it with other system
events.

Solution
========
To address this, we need to additionally record a precise timestamp when
the maximum latency occurs.  By correlating this timestamp with system
logs and monitoring metrics, we can identify processes with abnormal
resource usage at the same moment, which can help us to pinpoint root
causes.

Use Case
========
bash-4.4# ./getdelays -d -t 227
print delayacct stats ON
TGID    227
CPU         count     real total  virtual total    delay total  delay average      delay max      delay min      delay max timestamp
               46      188000000      192348334        4098012          0.089ms     0.429260ms     0.051205ms    2026-01-15T15:06:58
IO          count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A
SWAP        count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A
RECLAIM     count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A
THRAS HING   count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A
COMPACT     count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A
WPCOPY      count    delay total  delay average      delay max      delay min      delay max timestamp
              182       19413338          0.107ms     0.547353ms     0.022462ms    2026-01-15T15:05:24
IRQ         count    delay total  delay average      delay max      delay min      delay max timestamp
                0              0          0.000ms     0.000000ms     0.000000ms                    N/A

Link: https://lkml.kernel.org/r/20260119100241520gWubW8-5QfhSf9gjqcc_E@zte.com.cn
Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Cc: Fan Yu <fan.yu9@zte.com.cn>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: xu xin <xu.xin16@zte.com.cn>
Cc: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-01-31 16:16:06 -08:00
..
accounting delayacct: add timestamp of delay max 2026-01-31 16:16:06 -08:00
arch tools headers: Sync arm64 headers with kernel sources 2025-12-24 11:43:12 -08:00
bootconfig
bpf bpftool: Fix build warnings due to MS extensions 2025-12-09 23:21:33 -08:00
build tools build: Fix the common set of features test wrt libopenssl 2025-12-27 20:26:44 -08:00
certs
cgroup
counter
crypto
debugging kernel-chktaint: add reporting for tainted modules 2026-01-26 19:07:15 -08:00
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs docs: makefile: move rustdoc check to the build wrapper 2025-11-29 08:42:53 -07:00
firewire
firmware
gpio
hv
iio iio: add power and energy measurement modifiers 2025-09-13 13:47:19 +01:00
include treewide: Update email address 2026-01-11 06:09:11 -10:00
kvm/kvm_stat
laptop
leds
lib bpf-fixes 2025-12-17 15:54:58 +12:00
memory-model
mm tools/mm/page_owner_sort: fix timestamp comparison for stable sorting 2025-12-23 11:23:14 -08:00
net tools: ynl: render event op docs correctly 2026-01-13 11:56:36 -08:00
objtool objtool: fix build failure due to missing libopcodes check 2026-01-13 11:37:51 +01:00
pcmcia
perf treewide: Update email address 2026-01-11 06:09:11 -10:00
power platform-drivers-x86 for v6.19-1 2025-12-10 06:38:17 +09:00
rcu
sched
sched_ext tools/sched_ext: update scx_show_state.py for scx_aborting change 2025-12-28 06:11:26 -10:00
scripts tools headers: Sync syscall table with kernel sources 2025-12-24 11:43:36 -08:00
sound
spi
testing watchdog: softlockup: panic when lockup duration exceeds N thresholds 2026-01-20 19:44:20 -08:00
thermal tools/thermal/thermal-engine: Fix format string bug in thermal-engine 2025-11-25 11:00:28 +01:00
time
tracing rtla updaets for v6.19: 2025-12-05 09:34:01 -08:00
usb
verification
virtio tools/virtio: add device, device_driver stubs 2025-12-24 08:02:56 -05:00
wmi
workqueue
writeback
Makefile tools/dma: move dma_map_benchmark from selftests to tools/dma 2025-10-29 09:41:40 +01:00