From: Andrew Morton <akpm@linux-foundation.org>
To: <wang.yaxin@zte.com.cn>
Cc: <fan.yu9@zte.com.cn>, <yang.yang29@zte.com.cn>, <corbet@lwn.net>,
<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<xu.xin16@zte.com.cn>
Subject: Re: [PATCH v2] delayacct: add timestamp of delay max
Date: Thu, 15 Jan 2026 08:37:39 -0800 [thread overview]
Message-ID: <20260115083739.7b2e8af2bef09f17be217366@linux-foundation.org> (raw)
In-Reply-To: <20260115235237033LzsFFFvq_z_7YAubzLW8T@zte.com.cn>
On Thu, 15 Jan 2026 23:52:37 +0800 (CST) <wang.yaxin@zte.com.cn> wrote:
> From: Wang Yaxin <wang.yaxin@zte.com.cn>
> Problem
> =======
> Commit 658eb5ab916d ("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.
Seems sensible, thanks.
> 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-15 15:06:58
"2026-01-15 15:06:58" isn't very friendly to parsers? And because it
has a space it's two columns whereas everything else in here is a
single column. Perhaps there's some more parser-friendly way of
presenting this?
>
> ...
>
> @@ -217,7 +223,8 @@ void __delayacct_freepages_end(void)
> ¤t->delays->freepages_delay,
> ¤t->delays->freepages_count,
> ¤t->delays->freepages_delay_max,
> - ¤t->delays->freepages_delay_min);
> + ¤t->delays->freepages_delay_min,
> + ¤t->delays->freepages_delay_max_ts);
> }
The whitespacing is inconsistent here.
> void __delayacct_thrashing_start(bool *in_thrashing)
> @@ -241,7 +248,8 @@ void __delayacct_thrashing_end(bool *in_thrashing)
> ¤t->delays->thrashing_delay,
> ¤t->delays->thrashing_count,
> ¤t->delays->thrashing_delay_max,
> - ¤t->delays->thrashing_delay_min);
> + ¤t->delays->thrashing_delay_min,
> + ¤t->delays->thrashing_delay_max_ts);
> }
Many more instances of this.
prev parent reply other threads:[~2026-01-15 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 15:52 wang.yaxin
2026-01-15 16:37 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260115083739.7b2e8af2bef09f17be217366@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=fan.yu9@zte.com.cn \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wang.yaxin@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®