[PATCH linux-next 0/3] tools/delaytop: implement real-time keyboard interaction support

fan.yu9@zte.com.cn posted 3 patches 1 month ago
There is a newer version of this series
tools/accounting/delaytop.c | 347 +++++++++++++++++++++++++++++-------
1 file changed, 287 insertions(+), 60 deletions(-)
[PATCH linux-next 0/3] tools/delaytop: implement real-time keyboard interaction support
Posted by fan.yu9@zte.com.cn 1 month ago
From: Fan Yu <fan.yu9@zte.com.cn>

Current Limitations
===================
The current delaytop implementation has two main limitations:
1) Static sorting only by CPU delay
Forcing users to restart with different parameters to analyze
other resource bottlenecks.
2) Memory delay information is always expanded
Causing information overload when only high-level memory pressure
monitoring is needed.

Improvements
============
1) Implemented dynamic sorting capability
- Interactive key 'o' triggers sort mode.
- Supports sorting by CPU/IO/Memory/IRQ delays.
- Memory subcategories available in verbose mode.
 * c - CPU delay (default)
 * i - IO delay
 * m - Total memory delay
 * q - IRQ delay
 * s/r/t/p/w - Memory subcategories (in verbose mode)
2) Added memory display modes
- Compact view (default): shows aggregated memory delays.
- Verbose view ('M' key): breaks down into memory sub-delays.
 * SWAP - swapin delays
 * RCL - freepages reclaim delays
 * THR - thrashing delays
 * CMP - compaction delays
 * WP - write-protect copy delays

Practical benefits
==================
1) Dynamic Sorting for Real-Time Bottleneck Detection
System administrators can now dynamically change sorting to identify
different types of resource bottlenecks without restarting.

2) Enhanced Usability with On-Screen Keybindings
More intuitive interactive usage with on-screen keybindings help.
Reduced screen clutter when only memory overview is needed.

Fan Yu (3):
  tools/delaytop: add memory verbose mode support
  tools/delaytop: add flexible sorting by delay field
  tools/delaytop: add interactive mode with keyboard controls

 tools/accounting/delaytop.c | 347 +++++++++++++++++++++++++++++-------
 1 file changed, 287 insertions(+), 60 deletions(-)

-- 
2.25.1
Re: [PATCH linux-next 0/3] tools/delaytop: implement real-time keyboard interaction support
Posted by yang.yang29@zte.com.cn 1 month ago
> 2) Enhanced Usability with On-Screen Keybindings
> More intuitive interactive usage with on-screen keybindings help.
> Reduced screen clutter when only memory overview is needed.

It's more intuitive and easier to understand the patches if show the
output of new features in git log. And we notice that if PSI or
delayaccouting is off, delaytop will output zero data, I think we
should tell user why it's zero, since not all user knows kernel config
will. Else: 
Acked-by: Yang Yang <yang.yang29@zte.com.cn>
Re: [PATCH linux-next 0/3] tools/delaytop: implement real-time keyboard interaction support
Posted by fan.yu9@zte.com.cn 4 weeks, 1 day ago
> It's more intuitive and easier to understand the patches if show the
> output of new features in git log. And we notice that if PSI or
> delayaccouting is off, delaytop will output zero data, I think we
> should tell user why it's zero, since not all user knows kernel config
> will. Else:
> Acked-by: Yang Yang <yang.yang29@zte.com.cn>

Hi Yang,
Thanks for the review. I’ll address them in v2:
1. Add a message to inform the user when PSI/delay accounting is disabled.
2. Add new features use case in Documentation/accounting/delay-accounting.rst and git log.

Best regards,
Fan Yu
Re: [PATCH linux-next 0/3] tools/delaytop: implement real-time keyboard interaction support
Posted by xu.xin16@zte.com.cn 1 month ago
From: Fan Yu <fan.yu9@zte.com.cn>
> Current Limitations
> ===================
> The current delaytop implementation has two main limitations:
> 1) Static sorting only by CPU delay
> Forcing users to restart with different parameters to analyze
> other resource bottlenecks.
> 2) Memory delay information is always expanded
> Causing information overload when only high-level memory pressure
> monitoring is needed.
> 
> Improvements
> ============
> 1) Implemented dynamic sorting capability
> - Interactive key 'o' triggers sort mode.
> - Supports sorting by CPU/IO/Memory/IRQ delays.
> - Memory subcategories available in verbose mode.
>  * c - CPU delay (default)
>  * i - IO delay
>  * m - Total memory delay
>  * q - IRQ delay
>  * s/r/t/p/w - Memory subcategories (in verbose mode)
> 2) Added memory display modes
> - Compact view (default): shows aggregated memory delays.
> - Verbose view ('M' key): breaks down into memory sub-delays.
>  * SWAP - swapin delays
>  * RCL - freepages reclaim delays
>  * THR - thrashing delays
>  * CMP - compaction delays
>  * WP - write-protect copy delays
>

What about updating usages into Documentation/accounting/delay-accounting.rst ?

> 
> 
> Fan Yu (3):
>   tools/delaytop: add memory verbose mode support
>   tools/delaytop: add flexible sorting by delay field
>   tools/delaytop: add interactive mode with keyboard controls
> 
>  tools/accounting/delaytop.c | 347 +++++++++++++++++++++++++++++-------
>  1 file changed, 287 insertions(+), 60 deletions(-)

Other parts are ok except [PATCH 1/3]