[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260115083739.7b2e8af2bef09f17be217366@linux-foundation.org>
Date: Thu, 15 Jan 2026 08:37:39 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: <wang.yaxin@....com.cn>
Cc: <fan.yu9@....com.cn>, <yang.yang29@....com.cn>, <corbet@....net>,
<linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<xu.xin16@....com.cn>
Subject: Re: [PATCH v2] delayacct: add timestamp of delay max
On Thu, 15 Jan 2026 23:52:37 +0800 (CST) <wang.yaxin@....com.cn> wrote:
> From: Wang Yaxin <wang.yaxin@....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.
Powered by blists - more mailing lists