lkml.org 
[lkml]   [2020]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU
Christophe Leroy wrote:
>
>
> Le 27/11/2019 à 13:01, Gautham R. Shenoy a écrit :
>> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>>
>> 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 ?

As you point out, it is only done with
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE, but isn't available with NO_HZ_FULL,
which happens to be the distro default nowadays.

- Naveen

\
 
 \ /
  Last update: 2020-02-05 09:09    [W:0.137 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site