Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-30 Thread Viresh Kumar
I am not going to fight hard to prove a point as the code is in good working conditions, but wanted to finish the discussion .. On 29-07-15, 22:32, Rafael J. Wysocki wrote: > On Wed, Jul 29, 2015 at 4:21 PM, Viresh Kumar wrote: > > On 29-07-15, 15:57, Rafael J. Wysocki wrote: > >> In practice, th

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-29 Thread Rafael J. Wysocki
Hi Viresh, On Wed, Jul 29, 2015 at 4:21 PM, Viresh Kumar wrote: > On 29-07-15, 15:57, Rafael J. Wysocki wrote: >> In practice, this means a cpufreq driver registration done in parallel >> with CPU hotplug. > > Not necessarily. Also consider the case where cpufreq driver is already > working > fo

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-29 Thread Viresh Kumar
On 29-07-15, 15:57, Rafael J. Wysocki wrote: > In practice, this means a cpufreq driver registration done in parallel > with CPU hotplug. Not necessarily. Also consider the case where cpufreq driver is already working for a set of CPUs. And a new set of CPUs (that will share the policy) are gettin

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-29 Thread Rafael J. Wysocki
Hi Russell, On Wed, Jul 29, 2015 at 11:11 AM, Russell King - ARM Linux wrote: > On Wed, Jul 29, 2015 at 03:38:03AM +0200, Rafael J. Wysocki wrote: >> On Monday, July 27, 2015 08:09:35 PM Viresh Kumar wrote: >> > On 27-07-15, 15:45, Rafael J. Wysocki wrote: >> > > Say the subsys add callback runs

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-29 Thread Russell King - ARM Linux
On Wed, Jul 29, 2015 at 03:38:03AM +0200, Rafael J. Wysocki wrote: > On Monday, July 27, 2015 08:09:35 PM Viresh Kumar wrote: > > On 27-07-15, 15:45, Rafael J. Wysocki wrote: > > > Say the subsys add callback runs for a CPU and it doesn't have a policy. > > > If it is offline, we ignore it and the

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-28 Thread Viresh Kumar
On 29-07-15, 03:38, Rafael J. Wysocki wrote: > The rule is supposed to be "all of the present CPUs which do not own > a policy should point to one, unless it doesn't exist". The right > approach is then to create links from them to a policy object as soon > as we create one for them. Waiting for

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-28 Thread Rafael J. Wysocki
On Monday, July 27, 2015 08:09:35 PM Viresh Kumar wrote: > On 27-07-15, 15:45, Rafael J. Wysocki wrote: > > Say the subsys add callback runs for a CPU and it doesn't have a policy. > > If it is offline, we ignore it and the add callback won't be executed > > for it again. > > > > In turn, if it is

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-27 Thread Viresh Kumar
On 27-07-15, 15:45, Rafael J. Wysocki wrote: > Say the subsys add callback runs for a CPU and it doesn't have a policy. > If it is offline, we ignore it and the add callback won't be executed > for it again. > > In turn, if it is online, we create a policy for it and we should (right > away) link

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-27 Thread Rafael J. Wysocki
On Monday, July 27, 2015 07:57:18 AM Viresh Kumar wrote: > On 26-07-15, 00:46, Rafael J. Wysocki wrote: > > OK, I'll prepare a new version of that patch then, but as I said this > > choice means that we'll be creating the links to the policy at the > > policy creation time going forward. > > Atlea

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-26 Thread Viresh Kumar
On 26-07-15, 00:46, Rafael J. Wysocki wrote: > OK, I'll prepare a new version of that patch then, but as I said this > choice means that we'll be creating the links to the policy at the > policy creation time going forward. Atleast for the rc fix, we should do exactly this. Right. But we can reth

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-25 Thread Rafael J. Wysocki
Hi Viresh, On Sat, Jul 25, 2015 at 3:00 PM, Viresh Kumar wrote: > On 25-07-15, 00:17, Rafael J. Wysocki wrote: >> To avoid that warning, use the observation that cpufreq doesn't >> need to care about CPUs that have never been online. > > I have concerns over the very philosophy behind the patch a

Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links

2015-07-25 Thread Viresh Kumar
On 25-07-15, 00:17, Rafael J. Wysocki wrote: > To avoid that warning, use the observation that cpufreq doesn't > need to care about CPUs that have never been online. I have concerns over the very philosophy behind the patch and so wanted to discuss more on that. It will be really confusing to hav