[PATCH 0/3] pseries: Track and expose idle PURR and SPURR ticks

From: Gautham R. Shenoy
Date: Wed Nov 27 2019 - 07:01:59 EST


From: "Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx>

On PSeries LPARs, the data centers planners desire a more accurate
view of system utilization per resource such as CPU to plan the system
capacity requirements better. Such accuracy can be obtained by reading
PURR/SPURR registers for CPU resource utilization.

Tools such as lparstat which are used to compute the utilization need
to know [S]PURR ticks when the cpu was busy or idle. The [S]PURR
counters are already exposed through sysfs. We already account for
PURR ticks when we go to idle so that we can update the VPA area. This
patchset extends support to account for SPURR ticks when idle, and
expose both via per-cpu sysfs files.

These patches are required for enhancement to the lparstat utility
that compute the CPU utilization based on PURR and SPURR which can be
found here :
https://groups.google.com/forum/#!topic/powerpc-utils-devel/fYRo69xO9r4

Gautham R. Shenoy (3):
powerpc/pseries: Account for SPURR ticks on idle CPUs
powerpc/sysfs: Show idle_purr and idle_spurr for every CPU
Documentation: Document sysfs interfaces purr, spurr, idle_purr,
idle_spurr

Documentation/ABI/testing/sysfs-devices-system-cpu | 39 ++++++++++++++++++++++
arch/powerpc/kernel/idle.c | 2 ++
arch/powerpc/kernel/sysfs.c | 32 ++++++++++++++++++
drivers/cpuidle/cpuidle-pseries.c | 28 ++++++++++------
4 files changed, 90 insertions(+), 11 deletions(-)

--
1.9.4