* Quentin Perret <quentin.per...@arm.com> wrote:
> Expose the Energy Model (read-only) of all performance domains in sysfs > for convenience. To do so, add a kobject to the CPU subsystem under the > umbrella of which a kobject for each performance domain is attached. > > The resulting hierarchy is as follows for a platform with two > performance domains for example: > > /sys/devices/system/cpu/energy_model > ├── pd0 > │ ├── cost > │ ├── cpus > │ ├── frequency > │ └── power > └── pd4 > ├── cost > ├── cpus > ├── frequency > └── power > > In this implementation, the kobject abstraction is only used as a > convenient way of exposing data to sysfs. However, it could also be > used in the future to allocate and release performance domains in a more > dynamic way using reference counting. > > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> > Signed-off-by: Quentin Perret <quentin.per...@arm.com> > --- > include/linux/energy_model.h | 2 + > kernel/power/energy_model.c | 90 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 92 insertions(+) Why is a read-only ABI added for 'convenience'? We really don't do that as ABIs are final and they come with responsibilities. I think if this is for debug purposes it should be declared and put into debugfs or so. If it's for some other purpose that purpose should be declared. Thanks, Ingo