Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Viresh Kumar
On 03-02-16, 01:11, Shilpasri G Bhat wrote: > static int init_chip_info(void) > { > unsigned int chip[256]; > - unsigned int cpu, i; > + unsigned int cpu; > unsigned int prev_chip_id = UINT_MAX; > cpumask_t cpu_mask; > - int ret = -ENOMEM; > + int i, j, ret =

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Shilpasri G Bhat
Hi, On 02/03/2016 01:57 PM, Viresh Kumar wrote: > On 03-02-16, 01:11, Shilpasri G Bhat wrote: >> static int init_chip_info(void) >> { >> unsigned int chip[256]; >> -unsigned int cpu, i; >> +unsigned int cpu; >> unsigned int prev_chip_id = UINT_MAX; >> cpumask_t cpu_mask;

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Gautham R Shenoy
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 >

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Viresh Kumar
On 03-02-16, 14:12, Shilpasri G Bhat wrote: > I need the chip-id in the _show(). With just sysfs_create_group() I will > get the cpufreq_global_kobject in the _show() and I will not be able to > figure out the chip-id. The more I look at it, the more I am convinced that keeping this 'chip'

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Viresh Kumar
On 03-02-16, 17:32, Gautham R Shenoy wrote: > 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

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Viresh Kumar
On 03-02-16, 21:54, Shilpasri G Bhat wrote: > > > > > And now that you have mentioned that to me, why shouldn't this stats > > directory be moved to debugfs ? :) > > > > We are never going to perform a store here, isn't it ? And is just for > > information, nothing more. > > > > I would very

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Shilpasri G Bhat
> > And now that you have mentioned that to me, why shouldn't this stats > directory be moved to debugfs ? :) > > We are never going to perform a store here, isn't it ? And is just for > information, nothing more. > I would very much like to keep the throttle stats either in cpuX/cpufreq or

[PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-02 Thread Shilpasri G Bhat
Create sysfs attributes to export throttle information in /sys/devices/system/cpu/cpufreq/chipX. The newly added sysfs files are as follows: 1)/sys/devices/system/cpu/cpufreq/chipX/throttle_table This table gives the detailed information on number of times Pmax is limited to different frequencies