Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-09 Thread Viresh Kumar
On 10 July 2015 at 05:35, Rafael J. Wysocki wrote: >> - Because governors matched, we skip governor initialization and return >> after calling __cpufreq_governor(CPUFREQ_GOV_LIMITS). > > But this sounds fragile in principle. What's the benefit from skipping the > governor initialization in tha

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-09 Thread Rafael J. Wysocki
On Thursday, July 09, 2015 10:40:24 AM Viresh Kumar wrote: > On 09-07-15, 02:33, Rafael J. Wysocki wrote: > > > We also missed marking policy->governor as NULL while restoring the > > > policy. Because of that, we call __cpufreq_governor(CPUFREQ_GOV_LIMITS) > > > > How exactly does that happen? >

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-08 Thread Viresh Kumar
On 09-07-15, 02:33, Rafael J. Wysocki wrote: > > We also missed marking policy->governor as NULL while restoring the > > policy. Because of that, we call __cpufreq_governor(CPUFREQ_GOV_LIMITS) > > How exactly does that happen? Should have mentioned that in detail, sorry for being lazy. Hopefully

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-08 Thread Rafael J. Wysocki
On Wednesday, July 08, 2015 11:23:58 AM Viresh Kumar wrote: > When all CPUs of a policy are hot-unplugged, we EXIT the governor but > don't mark policy->governor as NULL. This was done in order to keep last > used governor's information intact in sysfs, while the CPUs are offline. > > We also miss

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-08 Thread Jon Medhurst (Tixy)
On Wed, 2015-07-08 at 11:23 +0530, Viresh Kumar wrote: > When all CPUs of a policy are hot-unplugged, we EXIT the governor but > don't mark policy->governor as NULL. This was done in order to keep last > used governor's information intact in sysfs, while the CPUs are offline. > > We also missed ma

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-08 Thread Viresh Kumar
On 08-07-15, 10:27, Jon Medhurst (Tixy) wrote: > I believe this also fixes the other issue I mentioned (nullptr deref in > in arm_big_little driver). To test that, after applying this patch, I > modified the code to force __cpufreq_governor to still return an error > when a cpu is hotpluged back in

Re: [PATCH] cpufreq: Initialize the governor again while restoring policy

2015-07-07 Thread Pi-Cheng Chen
On Wed, Jul 8, 2015 at 1:53 PM, Viresh Kumar wrote: > When all CPUs of a policy are hot-unplugged, we EXIT the governor but > don't mark policy->governor as NULL. This was done in order to keep last > used governor's information intact in sysfs, while the CPUs are offline. > > We also missed marki