FROMGIT: PM / EM: Expose the Energy Model in debugfs
The recently introduced Energy Model (EM) framework manages power cost tables of CPUs. These tables are currently only visible from kernel space. However, in order to debug the behaviour of subsystems that use the EM (EAS for example), it is often required to know what the power costs are from userspace. For this reason, introduce under /sys/kernel/debug/energy_model a set of directories representing the performance domains of the system. Each performance domain contains a set of sub-directories representing the different capacity states (cs) and their attributes, as well as a file exposing the related CPUs. The resulting hierarchy is as follows on Arm juno r0 for example: /sys/kernel/debug/energy_model ├── pd0 │ ├── cpus │ ├── cs:450000 │ │ ├── cost │ │ ├── frequency │ │ └── power │ ├── cs:575000 │ │ ├── cost │ │ ├── frequency │ │ └── power │ ├── cs:700000 │ │ ├── cost │ │ ├── frequency │ │ └── power │ ├── cs:775000 │ │ ├── cost │ │ ├── frequency │ │ └── power │ └── cs:850000 │ ├── cost │ ├── frequency │ └── power └── pd1 ├── cpus ├── cs:1100000 │ ├── cost │ ├── frequency │ └── power ├── cs:450000 │ ├── cost │ ├── frequency │ └── power ├── cs:625000 │ ├── cost │ ├── frequency │ └── power ├── cs:800000 │ ├── cost │ ├── frequency │ └── power └── cs:950000 ├── cost ├── frequency └── power Bug: 120440300 Change-Id: I4098c3d3e07fc4a14514751ac881422131b759e9 Signed-off-by:Quentin Perret <quentin.perret@arm.com> Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit 9cac42d0645ceb2ca8b815cee04810ec9b0d13b3 git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge) Signed-off-by:
Quentin Perret <quentin.perret@arm.com>
Loading
Please register or sign in to comment