linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: <jiang.kun2@zte.com.cn>
Cc: <bsingharora@gmail.com>, <david@redhat.com>,
	<yang.yang29@zte.com.cn>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, <linux-doc@vger.kernel.org>,
	<wang.yong12@zte.com.cn>, <wang.yaxin@zte.com.cn>,
	<fan.yu9@zte.com.cn>, <he.peilin@zte.com.cn>,
	<tu.qiang35@zte.com.cn>, <qiu.yutan@zte.com.cn>,
	<zhang.yunkai@zte.com.cn>, <ye.xingchen@zte.com.cn>,
	<xu.xin16@zte.com.cn>
Subject: Re: [PATCH linux next] tools/accounting/delaytop: add delaytop  to record top-n task delay
Date: Sun, 22 Jun 2025 15:48:47 -0700	[thread overview]
Message-ID: <20250622154847.f7ea3c8c5b2c1193bf9bcbcf@linux-foundation.org> (raw)
In-Reply-To: <20250619211843633h05gWrBDMFkEH6xAVm_5y@zte.com.cn>

On Thu, 19 Jun 2025 21:18:43 +0800 (CST) <jiang.kun2@zte.com.cn> wrote:

> From: Yaxin Wang <wang.yaxin@zte.com.cn>
> 
> Problem
> =======
> The "getdelays" can only display the latency of a single task
> by specifying a PID, but it has the following limitations:
> 1. single-task perspective: only supports querying the
> latency (CPU, I/O, memory, etc.) of an individual task via
> PID and cannot provide a global analysis of high-latency
> processes across the system.
> 2. lack of High-Latency process awareness: when the overall
> system latency is high (e.g., a spike in CPU latency), there
> is no way to quickly identify the top N processes contributing
> to the highest latency.
> 3. poor interactivity: It lacks dynamic sorting and refresh
> capabilities (similar to top), making it difficult to monitor
> latency changes in real time.
> 
> Solution
> ========
> To address these limitations, we introduce the "delaytop" with
> the following capabilities:
> 1. system view: monitors latency metrics (CPU, I/O, memory, IRQ,
> etc.) for all system processes
> 2. supports field-based sorting (e.g., default sort by CPU latency
> in descending order)
> 3. dynamic interactive interface:
> focus on specific processes with --pid;
> limit displayed entries with --processes 20;
> control monitoring duration with --iterations;
> 
> Use case
> ========
> bash# ./delaytop

Looks nice, thanks.

>  tools/accounting/Makefile   |   2 +-
>  tools/accounting/delaytop.c | 673 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 674 insertions(+), 1 deletion(-)
>  create mode 100644 tools/accounting/delaytop.c

Some documentation would be nicer ;)

hp2:/usr/src/25> grep -rli getdelays Documentation 
Documentation/translations/zh_CN/accounting/delay-accounting.rst
Documentation/translations/zh_CN/accounting/taskstats.rst
Documentation/accounting/delay-accounting.rst
Documentation/accounting/cgroupstats.rst
Documentation/accounting/taskstats.rst



      parent reply	other threads:[~2025-06-22 22:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 13:18 jiang.kun2
2025-06-19 14:51 ` yang.yang29
2025-06-24  2:18   ` yang.yang29
2025-06-22 22:48 ` 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=20250622154847.f7ea3c8c5b2c1193bf9bcbcf@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=david@redhat.com \
    --cc=fan.yu9@zte.com.cn \
    --cc=he.peilin@zte.com.cn \
    --cc=jiang.kun2@zte.com.cn \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qiu.yutan@zte.com.cn \
    --cc=tu.qiang35@zte.com.cn \
    --cc=wang.yaxin@zte.com.cn \
    --cc=wang.yong12@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zhang.yunkai@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