Re: [PATCH] cpufreq/stats: Add "unknown" frequency field in stats tables

2013-11-19 Thread viresh kumar
On Tuesday 19 November 2013 11:10 AM, Viresh Kumar wrote: > diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c > index 4cf0d28..ebb21cd 100644 > --- a/drivers/cpufreq/cpufreq_stats.c > +++ b/drivers/cpufreq/cpufreq_stats.c > @@ -72,9 +72,13 @@ static ssize_t

Re: [PATCH] cpufreq/stats: Add "unknown" frequency field in stats tables

2013-11-19 Thread Viresh Kumar
On 19 November 2013 14:12, Jon Medhurst (Tixy) wrote: > I'm wondering if this would break any user-side code parsing this output > and does that matter? (E.g. powertop will end up doing strtoull on > "unknown" and get zero as the frequency.) Would omitting 'unknown' if > the time is zero be

Re: [PATCH] cpufreq/stats: Add "unknown" frequency field in stats tables

2013-11-19 Thread Jon Medhurst (Tixy)
On Tue, 2013-11-19 at 11:10 +0530, Viresh Kumar wrote: > commit 46a310b ([CPUFREQ] Don't set stat->last_index to -1 if the pol->cur has > incorrect value.) tries to handle case where policy->cur does not match any > entry in freq_table. > > As indicated in the above commit, the exact match search

Re: [PATCH] cpufreq/stats: Add unknown frequency field in stats tables

2013-11-19 Thread Jon Medhurst (Tixy)
On Tue, 2013-11-19 at 11:10 +0530, Viresh Kumar wrote: commit 46a310b ([CPUFREQ] Don't set stat-last_index to -1 if the pol-cur has incorrect value.) tries to handle case where policy-cur does not match any entry in freq_table. As indicated in the above commit, the exact match search of

Re: [PATCH] cpufreq/stats: Add unknown frequency field in stats tables

2013-11-19 Thread Viresh Kumar
On 19 November 2013 14:12, Jon Medhurst (Tixy) t...@linaro.org wrote: I'm wondering if this would break any user-side code parsing this output and does that matter? (E.g. powertop will end up doing strtoull on unknown and get zero as the frequency.) Would omitting 'unknown' if the time is

Re: [PATCH] cpufreq/stats: Add unknown frequency field in stats tables

2013-11-19 Thread viresh kumar
On Tuesday 19 November 2013 11:10 AM, Viresh Kumar wrote: diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 4cf0d28..ebb21cd 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -72,9 +72,13 @@ static ssize_t

[PATCH] cpufreq/stats: Add "unknown" frequency field in stats tables

2013-11-18 Thread Viresh Kumar
commit 46a310b ([CPUFREQ] Don't set stat->last_index to -1 if the pol->cur has incorrect value.) tries to handle case where policy->cur does not match any entry in freq_table. As indicated in the above commit, the exact match search of freq_table_get index will return a -1 which is stored in

[PATCH] cpufreq/stats: Add unknown frequency field in stats tables

2013-11-18 Thread Viresh Kumar
commit 46a310b ([CPUFREQ] Don't set stat-last_index to -1 if the pol-cur has incorrect value.) tries to handle case where policy-cur does not match any entry in freq_table. As indicated in the above commit, the exact match search of freq_table_get index will return a -1 which is stored in