Re: perf tools:Is there any tools to found out the max latency by irq or cpu idle

From: Arnaldo Carvalho de Melo
Date: Mon Apr 15 2019 - 13:59:17 EST


Em Mon, Apr 15, 2019 at 07:52:59AM -0500, Paul Clarke escreveu:
> On 4/13/19 1:01 AM, Linhaifeng wrote:
> > Sorry, the value 131081408 is just for example. Actually the result is like this:
> > sqrt 2019-04-10 23:53:50: 43968
> > sqrt 2019-04-10 23:53:51: 44060
> > sqrt 2019-04-10 23:53:52: 49012
> > sqrt 2019-04-10 23:53:53: 38172
> > sqrt 2019-04-10 23:53:54: 131081408
> > sqrt 2019-04-10 23:53:55: 43600
> > sqrt 2019-04-10 23:53:56: 46704
> > sqrt 2019-04-10 23:53:57: 46880
> > sqrt 2019-04-10 23:53:58: 44332
> > ââ
> > sqrt 2019-04-10 02:17:15: 136345876
> > ââ
> > sqrt 2019-04-10 04:40:35: 136335644
> > ââ
>
> Given the periodicity, I'm wondering if it could be System Management Interrupts (SMIs)?
>
> If so, some BIOSes have settings to mitigate, otherwise, there's not much that can be done, per my understanding.

[root@quaco perf]# perf list smi

List of pre-defined events (to be used in -e):

msr/smi/ [Kernel PMU event]

sunrpc:xprt_transmit [Tracepoint event]
tcp:tcp_retransmit_skb [Tracepoint event]
tcp:tcp_retransmit_synack [Tracepoint event]

sdt_qemu:qmp_block_job_dismiss [SDT event]
sdt_qemu:qmp_job_dismiss [SDT event]

Metric Groups:

[root@quaco perf]#

Here, using it:

[root@quaco perf]# perf stat -I 1000 -e msr/smi/
# time counts unit events
1.000919819 0 msr/smi/
2.001689950 0 msr/smi/
3.002266988 0 msr/smi/
4.003049439 16 msr/smi/
5.003676064 0 msr/smi/
6.004420613 16 msr/smi/
^C 6.609405666 0 msr/smi/

[root@quaco perf]#


In this Lenovo T480s I generate SMIs by pressing the mute button :-)

- Arnaldo