Re: [Update 2x] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-09 Thread Rafael J. Wysocki
On Monday, February 09, 2015 04:44:08 PM Peter Zijlstra wrote: > On Mon, Feb 09, 2015 at 03:54:22AM +0100, Rafael J. Wysocki wrote: > > Complete patch with that modification is appended. In the next few days I'm > > going to split it into smaller parts and send along with cpuidle driver > > patche

Re: [Update 2x] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-09 Thread Peter Zijlstra
On Mon, Feb 09, 2015 at 03:54:22AM +0100, Rafael J. Wysocki wrote: > Complete patch with that modification is appended. In the next few days I'm > going to split it into smaller parts and send along with cpuidle driver > patches implementing ->enter_freeze. > > Please let me know what you think.

Re: [Update 2x] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-09 Thread Peter Zijlstra
On Mon, Feb 09, 2015 at 03:54:22AM +0100, Rafael J. Wysocki wrote: > > > > The only remaining issue might be a NMI calling into > > > > ktime_get_mono_fast_ns() before timekeeping is resumed. Its probably a > > > > non issue on x86/tsc, but it might be a problem on other platforms > > > > which tur

Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-09 Thread Rafael J. Wysocki
On Monday, February 09, 2015 10:49:26 AM Peter Zijlstra wrote: > On Fri, Feb 06, 2015 at 11:36:12PM +0100, Rafael J. Wysocki wrote: > > On Friday, February 06, 2015 07:29:22 PM Peter Zijlstra wrote: > > > > > So I'm a wee bit confused; if we use an enter_freeze() state that keeps > > > > interrupt

Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-09 Thread Peter Zijlstra
On Fri, Feb 06, 2015 at 11:36:12PM +0100, Rafael J. Wysocki wrote: > On Friday, February 06, 2015 07:29:22 PM Peter Zijlstra wrote: > > > So I'm a wee bit confused; if we use an enter_freeze() state that keeps > > > interrupts disabled; who is going to call the freeze_wake() thing? > > > > Ah, I

[Update 2x] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-08 Thread Rafael J. Wysocki
On Friday, February 06, 2015 02:20:13 AM Rafael J. Wysocki wrote: > > On Thursday, January 29, 2015 11:20:10 PM Rafael J. Wysocki wrote: > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > > > On 2015/1/22 18:15, Thomas Gleixner wrote

Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-06 Thread Rafael J. Wysocki
On Friday, February 06, 2015 07:29:22 PM Peter Zijlstra wrote: > On Fri, Feb 06, 2015 at 05:14:54PM +0100, Peter Zijlstra wrote: > > On Fri, Feb 06, 2015 at 02:20:13AM +0100, Rafael J. Wysocki wrote: > > > void freeze_wake(void) > > > { > > > + unsigned long flags; > > > + > > > + spin_lock_irqsa

Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-06 Thread Peter Zijlstra
On Fri, Feb 06, 2015 at 05:14:54PM +0100, Peter Zijlstra wrote: > On Fri, Feb 06, 2015 at 02:20:13AM +0100, Rafael J. Wysocki wrote: > > void freeze_wake(void) > > { > > + unsigned long flags; > > + > > + spin_lock_irqsave(&suspend_freeze_lock, flags); > > + if (suspend_freeze_state > FREEZ

Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-06 Thread Peter Zijlstra
On Fri, Feb 06, 2015 at 02:20:13AM +0100, Rafael J. Wysocki wrote: > void freeze_wake(void) > { > + unsigned long flags; > + > + spin_lock_irqsave(&suspend_freeze_lock, flags); > + if (suspend_freeze_state > FREEZE_STATE_NONE) { > + suspend_freeze_state = FREEZE_STATE_WAKE

[Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-02-05 Thread Rafael J. Wysocki
On Thursday, January 29, 2015 11:20:10 PM Rafael J. Wysocki wrote: > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > > On 2015/1/22 18:15, Thomas Gleixner wrote: [cut] > > > > You need to make sure in the low level idle implementatio

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-29 Thread Rafael J. Wysocki
On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > On 2015/1/22 18:15, Thomas Gleixner wrote: > > > Can we please stop adding more crap to that notifier thing? I rather > > > see that go away than being expanded. > > > > Are you referring to

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-27 Thread Li, Aubrey
On 2015/1/27 23:10, Rafael J. Wysocki wrote: > On Tuesday, January 27, 2015 04:03:29 PM Li, Aubrey wrote: >> On 2015/1/26 22:41, Rafael J. Wysocki wrote: >>> On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: On Mon, 26 Jan 2015, Li, Aubrey wrote: > On 2015/1/22 18:15, Thomas G

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-27 Thread Rafael J. Wysocki
On Tuesday, January 27, 2015 04:03:29 PM Li, Aubrey wrote: > On 2015/1/26 22:41, Rafael J. Wysocki wrote: > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > >> On Mon, 26 Jan 2015, Li, Aubrey wrote: > >>> On 2015/1/22 18:15, Thomas Gleixner wrote: > > > > [...] > > > > +

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-27 Thread Li, Aubrey
On 2015/1/26 22:41, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: >> On Mon, 26 Jan 2015, Li, Aubrey wrote: >>> On 2015/1/22 18:15, Thomas Gleixner wrote: > > [...] > > + /* > + * cpuidle_enter will return with interrupt enabled

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Li, Aubrey
On 2015/1/26 22:45, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 03:15:43 PM Thomas Gleixner wrote: >> On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: >> >>> On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: On Mon, 26 Jan 2015, Li, Aubrey wrote: > On 2015/1/22 18:15,

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Rafael J. Wysocki
On Monday, January 26, 2015 03:34:22 PM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > > On Monday, January 26, 2015 03:24:27 PM Thomas Gleixner wrote: > > > On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > > > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 03:24:27 PM Thomas Gleixner wrote: > > On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > > > The only remaining issue might be a NMI calling into > > > >

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Rafael J. Wysocki
On Monday, January 26, 2015 03:24:27 PM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > > The only remaining issue might be a NMI calling into > > > ktime_get_mono_fast_ns() before timekeeping is resumed.

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > The only remaining issue might be a NMI calling into > > ktime_get_mono_fast_ns() before timekeeping is resumed. Its probably a > > non issue on x86/tsc, but it might be a problem on o

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Rafael J. Wysocki
On Monday, January 26, 2015 03:15:43 PM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > > > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > > > On 2015/1/22 18:15, Thomas Gleixner wrote: > > > > > Can we pleas

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Rafael J. Wysocki
On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > On 2015/1/22 18:15, Thomas Gleixner wrote: [...] > > >> +/* > > >> + * cpuidle_enter will return with interrupt enabled > > >> + */ > > >> +

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > > On 2015/1/22 18:15, Thomas Gleixner wrote: > > > > Can we please stop adding more crap to that notifier thing? I rather > > > > see that g

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Rafael J. Wysocki
On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: > On Mon, 26 Jan 2015, Li, Aubrey wrote: > > On 2015/1/22 18:15, Thomas Gleixner wrote: > > > Can we please stop adding more crap to that notifier thing? I rather > > > see that go away than being expanded. > > > > Are you referring to

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Li, Aubrey wrote: > On 2015/1/22 18:15, Thomas Gleixner wrote: > > Can we please stop adding more crap to that notifier thing? I rather > > see that go away than being expanded. > > Are you referring to FREEZE_PREPARE or remove all of FREEZE staff at all? > > What's the disad

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Li, Aubrey
Hi Thomas, Thanks for the comments, my feedback below: On 2015/1/22 18:15, Thomas Gleixner wrote: > On Tue, 9 Dec 2014, Li, Aubrey wrote: >> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h >> index 2e4cb67..d118e0b 100644 >> --- a/include/linux/clockchips.h >> +++ b/include/l

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-22 Thread Thomas Gleixner
On Tue, 9 Dec 2014, Li, Aubrey wrote: > diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h > index 2e4cb67..d118e0b 100644 > --- a/include/linux/clockchips.h > +++ b/include/linux/clockchips.h > @@ -18,6 +18,9 @@ enum clock_event_nofitiers { > CLOCK_EVT_NOTIFY_BROADCAST_EXIT

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-19 Thread Rafael J. Wysocki
On Wednesday, January 14, 2015 08:24:04 AM Li, Aubrey wrote: > Happy New Year, can you please take a look at this patch now? Thomas, Peter, any comments? > On 2014/12/9 11:01, Li, Aubrey wrote: > > The patch is based on v3.18. > > > > Freeze is a general power saving state that processes are fr

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-13 Thread Li, Aubrey
Happy New Year, can you please take a look at this patch now? Thanks, -Aubrey On 2014/12/9 11:01, Li, Aubrey wrote: > The patch is based on v3.18. > > Freeze is a general power saving state that processes are frozen, devices > are suspended and CPUs are in idle state. However, when the system en

[PATCH v3]PM/Sleep: Timer quiesce in freeze state

2014-12-08 Thread Li, Aubrey
The patch is based on v3.18. Freeze is a general power saving state that processes are frozen, devices are suspended and CPUs are in idle state. However, when the system enters freeze state, there are a few timers keep ticking and hence consumes more power unnecessarily. The observed timer events