• Tyrel Datwyler's avatar
    powerpc/pseries: export timebase register sample in lparcfg · 9f3ba362
    Tyrel Datwyler authored
    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: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    9f3ba362
lparcfg.c 19.5 KB