Messages in this thread | | | Date | Wed, 3 Feb 2016 17:32:58 +0530 | From | Gautham R Shenoy <> | Subject | Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats |
| |
Hi Viresh,
> > What I can suggest is: > - Move this directory inside cpuX/cpufreq/ directory, in a similar way > as to how we create 'stats' directory today. > - You can then get policy->cpu, to get chip->id out of it. > - The only disadvantage here is that the same chip directory will be > replicated in multiple policies, but that makes it more readable.
Thinking about it, having a sysfs group attached to a policy kobject looks ok if replication of the same chip information across multiple policies is not objectionable.
Regarding the table-format, it breaks the sysfs's one-value-per-file rule. So I would still prefer each throttle reason being a separate file which gives the number of times the chip frequency was throttled due to that reason. We can live without the per-frequency throttle stats listed in the throttle_status.
So, would the following be sysfs group structure be acceptable?
$ls -1 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/ unthrottle powercap overtemp supply_fault overcurrent occ_reset turbo_stat sub_turbo_stat
-- Thanks and Regards gautham.
| |