]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: export timebase register sample in lparcfg
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Sat, 8 Dec 2018 23:48:27 +0000 (17:48 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 21 Feb 2019 13:10:15 +0000 (00:10 +1100)
commit36ad6fd0a64434d03560b33f3a41b6cb5d7985a5
treee59f7b56e1ef41c524b4bd53afaef24b3c6cef28
parentccee1184ae29c98c3abd7b7f710e78475ea5c18f
powerpc/pseries: export timebase register sample in lparcfg

The Processor Utilzation of Resource Registers (PURR) provide an
estimate of resources used by a cpu thread. Section 7.6 in Book III of
the ISA outlines how to calculate the percentage of shared resources
for threads using the ratio of the PURR delta and Timebase Register
delta for a sampled period.

This calculation is currently done erroneously by the lparstat tool
from the powerpc-utils package. This patch exports the current
timebase value after we sample the PURRs and exposes it to userspace
accounting tools via /proc/ppc64/lparcfg.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/lparcfg.c