Le 27/11/2019 Ã 13:01, Gautham R. Shenoy a ÃcritÂ:
From: "Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx>
On Pseries LPARs, to calculate utilization, we need to know the
[S]PURR ticks when the CPUs were busy or idle.
The total PURR and SPURR ticks are already exposed via the per-cpu
sysfs files /sys/devices/system/cpu/cpuX/purr and
/sys/devices/system/cpu/cpuX/spurr.
This patch adds support for exposing the idle PURR and SPURR ticks via
/sys/devices/system/cpu/cpuX/idle_purr and
/sys/devices/system/cpu/cpuX/idle_spurr.
Might be a candid question, but I see in arch/powerpc/kernel/time.c that PURR/SPURR are already taken into account by the kernel to calculate utilisation when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is selected.
As far as I understand, you are wanting to expose this to userland to redo the calculation there. What is wrong with the values reported by the kernel ?