scripts/perf/pm/collect-cpu-load
0 → 100755
+65
−0
+65
−15
Loading
As we are at it, remove bottleneck in get_cpu_time() - avoid reading /proc/stat line by line to find target cpu as in case of systems with hundreds of cpus this increases the get_cpu_time()'s runtime quite significantly. Instead, slurp all cpu stats with a single read and expose them as _cpuN[]. On a system with 144 cpus single get_cpu_time()'s iteration dropped from ~5s to ~1s. Note that this tool uses plain integer arithmetic so the results per cpu time may be a bit off due to lacking precision. Nevertheless, they should serve nicely as an approximation. Change-Id: I64fecb593c5c38e3db79f75dcc4f23a9069c701a Signed-off-by:Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21173 Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>