Coo*_*hal 0 kernel-module linux-kernel perf
我在这里发布了一个类似上下文的问题
在解决了一些问题后,我降低了抖动。
我将描述我的场景。
我的内核启动参数如下所示:
nmi_watchdog=0 intel_idle.max_cstate=0 processr.max_cstate=0 nohz_full=7-11 isolcpus=7-11 mce=off rcu_nocbs=7-11 nosoftlockup cpuidle.off=1 powersave=off nonmi_ipi nnwatchdog
我有一个内核模块,它负责以给定的时间间隔发送一些数据包(这里我每 1 毫秒发送一次)。
因此,我执行了以下命令来获取性能统计信息
sudo ./perf stat -a -d -I 1000 --cpu=8 taskset -c 9 ./test.sh
下面,我发布了我得到的输出的摘录。从上面的命令,我试图分析我的 CPU Core 8 的事件。
因此,通过这种方式,这些组件不应相互干扰。
5.002780500 1000.296809 cpu-clock (msec) # 1.000 CPUs utilized
5.002780500 0 context-switches # 0.000 K/sec
5.002780500 0 cpu-migrations # 0.000 K/sec
5.002780500 0 page-faults # 0.000 K/sec
5.002780500 88,531 cycles # 0.000 GHz
5.002780500 29,738 instructions # 0.33 insn per cycle
5.002780500 6,639 branches # 0.007 M/sec
5.002780500 118 branch-misses # 1.72% of all branches
5.002780500 7,677 L1-dcache-loads # 0.008 M/sec
5.002780500 318 L1-dcache-load-misses # 4.04% of all L1-dcache hits
5.002780500 196 LLC-loads # 0.196 K/sec
5.002780500 169 LLC-load-misses # 84.08% of all LL-cache hits
Round 0
6.330091222 1327.302728 cpu-clock (msec) # 1.327 CPUs utilized
6.330091222 1 context-switches # 0.001 K/sec
6.330091222 1 cpu-migrations # 0.001 K/sec
6.330091222 0 page-faults # 0.000 K/sec
6.330091222 2,401,268,484 cycles # 2.276 GHz
6.330091222 1,700,438,285 instructions # 4.25 insn per cycle
6.330091222 400,075,413 branches # 379.216 M/sec
6.330091222 9,587 branch-misses # 0.01% of all branches
6.330091222 300,135,708 L1-dcache-loads # 284.487 M/sec
6.330091222 12,520 L1-dcache-load-misses # 0.03% of all L1-dcache hits
6.330091222 6,865 LLC-loads # 0.007 M/sec
6.330091222 5,177 LLC-load-misses # 394.69% of all LL-cache hits
Round 1
7.343309295 1013.219838 cpu-clock (msec) # 1.013 CPUs utilized
7.343309295 2 context-switches # 0.002 K/sec
7.343309295 1 cpu-migrations # 0.001 K/sec
7.343309295 0 page-faults # 0.000 K/sec
7.343309295 2,401,313,050 cycles # 2.289 GHz
7.343309295 1,700,446,830 instructions # 2.48 insn per cycle
7.343309295 400,076,590 branches # 381.375 M/sec
7.343309295 9,722 branch-misses # 0.01% of all branches
7.343309295 300,137,590 L1-dcache-loads # 286.108 M/sec
7.343309295 12,429 L1-dcache-load-misses # 0.01% of all L1-dcache hits
7.343309295 6,787 LLC-loads # 0.006 M/sec
7.343309295 5,167 LLC-load-misses # 246.77% of all LL-cache hits
Run Code Online (Sandbox Code Playgroud)
'Round "x"' 一词意味着我们每 ms 发送 1 个数据包,因此每 ms 每回合发送 1000 个数据包。
从上面的转储中我无法理解的是LLC-load-misses. 或者,准确地说,我无法找到深入挖掘此问题根源的方法。
关于这个问题的任何意见都会非常有帮助。
问候,库沙尔。
数量LLC-load-misses应解释为在测量的时间间隔内最后一级缓存(通常是现代英特尔芯片的 L3)中未命中的加载数量。
在测量的级别上,我相信进入同一缓存行的负载已经被行填充缓冲区“组合”了:如果您访问多个值,所有这些值都没有出现在 LLC 中的相同缓存行中,那么这些都是“从您的过程的角度来看,miss”(使用这些值中的任何一个都将等待完整的未命中持续时间),但我相信这仅计为LLC-load-misses计数器的一次未命中。