The patch titled Subject: delayacct: update docs and fix some spelling errors has been added to the -mm mm-nonmm-unstable branch. Its filename is delayacct-add-delay-max-to-record-delay-peak-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/delayacct-add-delay-max-to-record-delay-peak-fix.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Yaxin Wang <wang.yaxin@xxxxxxxxxx> Subject: delayacct: update docs and fix some spelling errors Date: Fri, 13 Dec 2024 19:27:00 +0800 (CST) Update delay-accounting.rst to include the 'delay max' in the output of getdelays, and fix some spelling errors before. Link: https://lkml.kernel.org/r/20241213192700771XKZ8H30OtHSeziGqRVMs0@xxxxxxxxxx Signed-off-by: Yaxin Wang <wang.yaxin@xxxxxxxxxx> Signed-off-by: Jiang Kun <jiang.kun2@xxxxxxxxxx> Cc: Balbir Singh <bsingharora@xxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Fan Yu <fan.yu9@xxxxxxxxxx> Cc: Peilin He <he.peilin@xxxxxxxxxx> Cc: tuqiang <tu.qiang35@xxxxxxxxxx> Cc: Wang Yong <wang.yong12@xxxxxxxxxx> Cc: xu xin <xu.xin16@xxxxxxxxxx> Cc: ye xingchen <ye.xingchen@xxxxxxxxxx> Cc: Yunkai Zhang <zhang.yunkai@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/accounting/delay-accounting.rst | 38 ++++++++-------- kernel/delayacct.c | 2 2 files changed, 20 insertions(+), 20 deletions(-) --- a/Documentation/accounting/delay-accounting.rst~delayacct-add-delay-max-to-record-delay-peak-fix +++ a/Documentation/accounting/delay-accounting.rst @@ -100,29 +100,29 @@ Get delays, since system boot, for pid 1 # ./getdelays -d -p 10 (output similar to next case) -Get sum of delays, since system boot, for all pids with tgid 5:: +Get sum and peak of delays, since system boot, for all pids with tgid 242:: - # ./getdelays -d -t 5 + bash-4.4# ./getdelays -d -t 242 print delayacct stats ON - TGID 5 + TGID 242 - CPU count real total virtual total delay total delay average - 8 7000000 6872122 3382277 0.423ms - IO count delay total delay average - 0 0 0.000ms - SWAP count delay total delay average - 0 0 0.000ms - RECLAIM count delay total delay average - 0 0 0.000ms - THRASHING count delay total delay average - 0 0 0.000ms - COMPACT count delay total delay average - 0 0 0.000ms - WPCOPY count delay total delay average - 0 0 0.000ms - IRQ count delay total delay average - 0 0 0.000ms + CPU count real total virtual total delay total delay average delay max + 239 296000000 307724885 1127792 0.005ms 0.238382ms + 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 + 230 19100476 0.083ms 0.383822ms + IRQ count delay total delay average delay max + 0 0 0.000ms 0.000000ms Get IO accounting for pid 1, it works only with -p:: --- a/kernel/delayacct.c~delayacct-add-delay-max-to-record-delay-peak-fix +++ a/kernel/delayacct.c @@ -93,7 +93,7 @@ void __delayacct_tsk_init(struct task_st /* * Finish delay accounting for a statistic using its timestamps (@start), - * accumalator (@total) and @count + * accumulator (@total) and @count */ static void delayacct_end(raw_spinlock_t *lock, u64 *start, u64 *total, u32 *count, u64 *max) { _ Patches currently in -mm which might be from wang.yaxin@xxxxxxxxxx are delayacct-add-delay-max-to-record-delay-peak.patch delayacct-add-delay-max-to-record-delay-peak-fix.patch