linux/Documentation
Wang Yaxin 658eb5ab91 delayacct: add delay max to record delay peak
Introduce the use cases of delay max, which can help quickly detect
potential abnormal delays in the system and record the types and specific
details of delay spikes.

Problem
========
Delay accounting can track the average delay of processes to show
system workload. However, when a process experiences a significant
delay, maybe a delay spike, which adversely affects performance,
getdelays can only display the average system delay over a period
of time. Yet, average delay is unhelpful for diagnosing delay peak.
It is not even possible to determine which type of delay has spiked,
as this information might be masked by the average delay.

Solution
=========
the 'delay max' can display delay peak since the system's startup,
which can record potential abnormal delays over time, including
the type of delay and the maximum delay. This is helpful for
quickly identifying crash caused by delay.

Use case
=========
bash# ./getdelays -d -p 244
print delayacct stats ON
PID     244

CPU             count     real total  virtual total    delay total  delay average      delay max
                   68      192000000      213676651         705643          0.010ms     0.306381ms
IO              count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms
SWAP            count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms
RECLAIM         count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms
THRASHING       count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms
COMPACT         count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms
WPCOPY          count    delay total  delay average      delay max
                  235       15648284          0.067ms     0.263842ms
IRQ             count    delay total  delay average      delay max
                    0              0          0.000ms     0.000000ms

[wang.yaxin@zte.com.cn: update docs and fix some spelling errors]
  Link: https://lkml.kernel.org/r/20241213192700771XKZ8H30OtHSeziGqRVMs0@zte.com.cn
Link: https://lkml.kernel.org/r/20241203164848805CS62CQPQWG9GLdQj2_BxS@zte.com.cn
Co-developed-by: Wang Yong <wang.yong12@zte.com.cn>
Signed-off-by: Wang Yong <wang.yong12@zte.com.cn>
Co-developed-by: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Co-developed-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Kun Jiang <jiang.kun2@zte.com.cn>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Fan Yu <fan.yu9@zte.com.cn>
Cc: Peilin He <he.peilin@zte.com.cn>
Cc: tuqiang <tu.qiang35@zte.com.cn>
Cc: Yang Yang <yang.yang29@zte.com.cn>
Cc: ye xingchen <ye.xingchen@zte.com.cn>
Cc: Yunkai Zhang <zhang.yunkai@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-01-12 20:20:59 -08:00
..
ABI linux-watchdog 6.13-rc1 tag 2024-12-05 10:03:43 -08:00
accel
accounting delayacct: add delay max to record delay peak 2025-01-12 20:20:59 -08:00
admin-guide 25 hotfixes. 16 are cc:stable. 18 are MM and 7 are non-MM. 2025-01-05 10:37:45 -08:00
arch ACPI/IORT: Add PMCG platform information for HiSilicon HIP09A 2024-12-05 11:24:18 +00:00
block
bpf bpf: Remove trailing whitespace in verifier.rst 2024-11-11 08:17:48 -08:00
cdrom
core-api Documentation/core-api: min_heap: add author information 2025-01-12 20:20:57 -08:00
cpu-freq
crypto
dev-tools Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
devicetree Merge tag 'drm-misc-fixes-2025-01-02' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2025-01-03 10:43:36 +10:00
doc-guide Documentation: kernel-doc: enumerate identifier *type*s 2024-11-22 10:37:40 -07:00
driver-api Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
fault-injection net: Implement fault injection forcing skb reallocation 2024-11-12 12:05:33 +01:00
fb
features riscv: Add qspinlock support 2024-11-11 07:33:20 -08:00
filesystems vfs-6.13-rc1.fixes 2024-11-27 08:11:46 -08:00
firmware-guide
firmware_class
fpga
gpu drm/amdgpu: Add documentation for enforce isolation feature 2024-11-08 11:45:29 -05:00
hid
hwmon hwmon: (tmp108) Add NXP p3t1085 support 2024-11-12 13:54:55 -08:00
i2c i2c-host updates for v6.13, part 1 2024-11-18 08:35:47 +01:00
iio docs: iio: ad7380: add adaq4370-4 and adaq4380-4 2024-11-09 10:42:03 +00:00
images
infiniband
input Input: fix the input_event struct documentation 2024-11-14 18:03:23 -08:00
isdn
kbuild Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
kernel-hacking docs/licensing: Clarify wording about "GPL" and "Proprietary" 2024-11-22 10:44:25 -07:00
leds
litmus-tests
livepatch
locking locking/Documentation: Fix grammar in percpu-rw-semaphore.rst 2024-11-13 10:59:01 +01:00
maintainer
mhi
misc-devices
mm docs/mm: add VMA locks documentation 2024-12-18 19:04:41 -08:00
netlabel
netlink netlink: specs: mptcp: fix missing doc 2024-12-27 11:16:21 -08:00
networking Documentation: networking: Add a caveat to nexthop_compat_mode sysctl 2024-12-10 18:26:24 -08:00
nvdimm
nvme
PCI Merge branch 'pci/endpoint' 2024-11-25 13:40:56 -06:00
pcmcia
peci
power Documentation: PM: Clarify pm_runtime_resume_and_get() return value 2024-12-10 20:14:22 +01:00
process A few late-arriving fixes, plus two more significant changes that were 2024-11-26 13:44:27 -08:00
RCU doc: rcu: update printed dynticks counter bits 2024-11-12 21:40:24 +01:00
rust Rust changes for v6.13 2024-11-26 14:00:26 -08:00
scheduler sched_ext: Rename scx_bpf_consume() to scx_bpf_dsq_move_to_local() 2024-11-11 07:06:16 -10:00
scsi
security
sound ASoC: Fixes for v6.13 2024-11-28 14:55:21 +01:00
sphinx
sphinx-static
spi
staging Documentation: Fix incorrect paths/magic in magic numbers rst 2024-11-04 12:34:59 -07:00
target
tee
timers
tools
trace tracing: Record task flag NEED_RESCHED_LAZY. 2024-11-22 17:49:39 -05:00
translations module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
usb
userspace-api drm for 6.13-rc1 2024-11-21 14:56:17 -08:00
virt The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
w1
watchdog watchdog: Delete the cpu5wdt driver 2024-11-05 10:04:39 +01:00
wmi platform-drivers-x86 for v6.13-1 2024-11-20 14:07:55 -08:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst