Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-18 Thread Viresh Kumar
On 18 November 2013 21:04, Nishanth Menon wrote: > depends on how we look at it.. if we consider freq_table as a list of > valid frequencies, anything that is not in there is an invalid entry. Partly correct. Yes freq table has a list of valid frequencies, but normally we just build a table of de

Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-18 Thread Nishanth Menon
On 11/18/2013 09:22 AM, Viresh Kumar wrote: > On 18 November 2013 20:38, Nishanth Menon wrote: >> On 11/15/2013 11:22 PM, viresh kumar wrote: > >>> I have a untested patch for this. If this looks okay, Nishant can you >>> please try >>> below patch? With some fixups from your side :) >> >> http:

Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-18 Thread Viresh Kumar
On 18 November 2013 20:38, Nishanth Menon wrote: > On 11/15/2013 11:22 PM, viresh kumar wrote: >> I have a untested patch for this. If this looks okay, Nishant can you please >> try >> below patch? With some fixups from your side :) > > http://pastebin.mozilla.org/3628975 > > I agree that it doe

Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-18 Thread Nishanth Menon
On 11/15/2013 11:22 PM, viresh kumar wrote: > On Saturday 16 November 2013 06:40 AM, Rafael J. Wysocki wrote: >> On Friday, November 15, 2013 06:20:43 PM Nishanth Menon wrote: > >>> So, instead of having a statistics information that never ever >>> reflects valid data in the mentioned case and scr

Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-15 Thread viresh kumar
On Saturday 16 November 2013 06:40 AM, Rafael J. Wysocki wrote: > On Friday, November 15, 2013 06:20:43 PM Nishanth Menon wrote: >> So, instead of having a statistics information that never ever >> reflects valid data in the mentioned case and scratching our heads, we >> instead, refuse to populat

Re: [PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-15 Thread Rafael J. Wysocki
On Friday, November 15, 2013 06:20:43 PM Nishanth Menon 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

[PATCH] cpufreq: stats: Do not populate stats when policy->cur has no exact match

2013-11-15 Thread Nishanth Menon
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 stat-