Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 03:05 PM, Viresh Kumar wrote: > On 16 July 2013 14:59, Srivatsa S. Bhat > wrote: >> On 07/16/2013 02:40 PM, Viresh Kumar wrote: > >>> So, even if you don't keep the fallback storage, things should work >>> without any issue (probably worth trying as this will get rid of a per >>>

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 16 July 2013 14:59, Srivatsa S. Bhat wrote: > On 07/16/2013 02:40 PM, Viresh Kumar wrote: >> So, even if you don't keep the fallback storage, things should work >> without any issue (probably worth trying as this will get rid of a per >> cpu variable :)) >> > > No, I already tried that and it

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 02:40 PM, Viresh Kumar wrote: > On 16 July 2013 14:26, Srivatsa S. Bhat > wrote: >> On 07/16/2013 11:45 AM, Viresh Kumar wrote: > >>> To understand it I actually applied your patches to get better view of the >>> code. >>> (Haven't tested it though).. And found that your code is

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 16 July 2013 14:26, Srivatsa S. Bhat wrote: > On 07/16/2013 11:45 AM, Viresh Kumar wrote: >> To understand it I actually applied your patches to get better view of the >> code. >> (Haven't tested it though).. And found that your code is doing the right >> thing >> and we shouldn't get a

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 11:45 AM, Viresh Kumar wrote: > On 15 July 2013 15:35, Srivatsa S. Bhat > wrote: >> Actually even I was wondering about this while writing the patch and >> I even tested shutdown after multiple suspend/resume cycles, to verify that >> the refcount is messed up. But surprisingly,

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 15 July 2013 15:35, Srivatsa S. Bhat wrote: > Actually even I was wondering about this while writing the patch and > I even tested shutdown after multiple suspend/resume cycles, to verify that > the refcount is messed up. But surprisingly, things worked just fine. > > Logically there should've

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 15 July 2013 15:35, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Actually even I was wondering about this while writing the patch and I even tested shutdown after multiple suspend/resume cycles, to verify that the refcount is messed up. But surprisingly, things worked just fine.

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 11:45 AM, Viresh Kumar wrote: On 15 July 2013 15:35, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Actually even I was wondering about this while writing the patch and I even tested shutdown after multiple suspend/resume cycles, to verify that the refcount is messed

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 16 July 2013 14:26, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 07/16/2013 11:45 AM, Viresh Kumar wrote: To understand it I actually applied your patches to get better view of the code. (Haven't tested it though).. And found that your code is doing the right thing and

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 02:40 PM, Viresh Kumar wrote: On 16 July 2013 14:26, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 07/16/2013 11:45 AM, Viresh Kumar wrote: To understand it I actually applied your patches to get better view of the code. (Haven't tested it though).. And found

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Viresh Kumar
On 16 July 2013 14:59, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 07/16/2013 02:40 PM, Viresh Kumar wrote: So, even if you don't keep the fallback storage, things should work without any issue (probably worth trying as this will get rid of a per cpu variable :)) No, I

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-16 Thread Srivatsa S. Bhat
On 07/16/2013 03:05 PM, Viresh Kumar wrote: On 16 July 2013 14:59, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 07/16/2013 02:40 PM, Viresh Kumar wrote: So, even if you don't keep the fallback storage, things should work without any issue (probably worth trying as this will

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 05:05 PM, Rafael J. Wysocki wrote: > On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote: >> On 07/15/2013 03:25 PM, Viresh Kumar wrote: >>> Hi Srivatsa, >>> >>> I may be wrong but it looks something is wrong in this patch. >>> >>> On 12 July 2013 03:47, Srivatsa S. Bhat >>>

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 03:51 PM, Viresh Kumar wrote: > On 15 July 2013 15:35, Srivatsa S. Bhat > wrote: >> Actually even I was wondering about this while writing the patch and >> I even tested shutdown after multiple suspend/resume cycles, to verify that >> the refcount is messed up. But surprisingly,

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Rafael J. Wysocki
On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote: > On 07/15/2013 03:25 PM, Viresh Kumar wrote: > > Hi Srivatsa, > > > > I may be wrong but it looks something is wrong in this patch. > > > > On 12 July 2013 03:47, Srivatsa S. Bhat > > wrote: > >> diff --git

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Viresh Kumar
On 15 July 2013 15:35, Srivatsa S. Bhat wrote: > Actually even I was wondering about this while writing the patch and > I even tested shutdown after multiple suspend/resume cycles, to verify that > the refcount is messed up. But surprisingly, things worked just fine. What kind of system have you

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 03:25 PM, Viresh Kumar wrote: > Hi Srivatsa, > > I may be wrong but it looks something is wrong in this patch. > > On 12 July 2013 03:47, Srivatsa S. Bhat > wrote: >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > >> @@ -1239,29 +1263,40 @@ static int

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Viresh Kumar
Hi Srivatsa, I may be wrong but it looks something is wrong in this patch. On 12 July 2013 03:47, Srivatsa S. Bhat wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev, > if ((cpus == 1)

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Viresh Kumar
Hi Srivatsa, I may be wrong but it looks something is wrong in this patch. On 12 July 2013 03:47, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 03:25 PM, Viresh Kumar wrote: Hi Srivatsa, I may be wrong but it looks something is wrong in this patch. On 12 July 2013 03:47, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c @@ -1239,29 +1263,40

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Viresh Kumar
On 15 July 2013 15:35, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Actually even I was wondering about this while writing the patch and I even tested shutdown after multiple suspend/resume cycles, to verify that the refcount is messed up. But surprisingly, things worked just fine.

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Rafael J. Wysocki
On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote: On 07/15/2013 03:25 PM, Viresh Kumar wrote: Hi Srivatsa, I may be wrong but it looks something is wrong in this patch. On 12 July 2013 03:47, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: diff --git

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 03:51 PM, Viresh Kumar wrote: On 15 July 2013 15:35, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Actually even I was wondering about this while writing the patch and I even tested shutdown after multiple suspend/resume cycles, to verify that the refcount is messed

Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-15 Thread Srivatsa S. Bhat
On 07/15/2013 05:05 PM, Rafael J. Wysocki wrote: On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote: On 07/15/2013 03:25 PM, Viresh Kumar wrote: Hi Srivatsa, I may be wrong but it looks something is wrong in this patch. On 12 July 2013 03:47, Srivatsa S. Bhat

[PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-11 Thread Srivatsa S. Bhat
To perform light-weight cpu-init and teardown in the cpufreq subsystem during suspend/resume, we need to separate out the 2 main functionalities of the cpufreq CPU hotplug callbacks, as outlined below: 1. Init/tear-down of core cpufreq and CPU-specific components, which are critical to the

[PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume

2013-07-11 Thread Srivatsa S. Bhat
To perform light-weight cpu-init and teardown in the cpufreq subsystem during suspend/resume, we need to separate out the 2 main functionalities of the cpufreq CPU hotplug callbacks, as outlined below: 1. Init/tear-down of core cpufreq and CPU-specific components, which are critical to the