Re: [RFC PATCH v3 04/10] PM / EM: Expose the Energy Model in sysfs

From: Peter Zijlstra
Date: Tue Jun 19 2018 - 08:17:04 EST


On Mon, May 21, 2018 at 03:24:59PM +0100, Quentin Perret wrote:
> This exposes the Energy Model (read-only) of all frequency domains in
> sysfs for convenience. To do so, a parent kobject is added to the CPU
> subsystem under the umbrella of which a kobject for each frequency
> domain is attached.
>
> The resulting hierarchy is as follows for a platform with two frequency
> domains for example:
>
> /sys/devices/system/cpu/energy_model
> âââ fd0
> â âââ capacity
> â âââ cpus
> â âââ frequency
> â âââ power
> âââ fd4
> âââ capacity
> âââ cpus
> âââ frequency
> âââ power
>

Given that each FD can have multiple {freq,power} tuples and sysfs has a
one value per file policy, how does this work?