Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Thomas Gleixner
On Tue, 17 Jul 2018, Mukesh Ojha wrote: > On 7/16/2018 10:44 PM, John Stultz wrote: > > > So, I think with the logic bug above it will work out properly, but > > > let me know if I'm still missing something. > > Please give it thought to a case where very first suspend fails with your > logic. >

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Thomas Gleixner
On Tue, 17 Jul 2018, Mukesh Ojha wrote: > On 7/16/2018 10:44 PM, John Stultz wrote: > > > So, I think with the logic bug above it will work out properly, but > > > let me know if I'm still missing something. > > Please give it thought to a case where very first suspend fails with your > logic. >

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 11:30 AM, Mukesh Ojha wrote: > > > On 7/16/2018 10:44 PM, John Stultz wrote: >> >> On Mon, Jul 16, 2018 at 9:30 AM, John Stultz >> wrote: >>> >>> On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha >>> wrote: On 7/13/2018 10:50 PM, John Stultz wrote: > > On

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 11:30 AM, Mukesh Ojha wrote: > > > On 7/16/2018 10:44 PM, John Stultz wrote: >> >> On Mon, Jul 16, 2018 at 9:30 AM, John Stultz >> wrote: >>> >>> On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha >>> wrote: On 7/13/2018 10:50 PM, John Stultz wrote: > > On

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/16/2018 10:44 PM, John Stultz wrote: On Mon, Jul 16, 2018 at 9:30 AM, John Stultz wrote: On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: On 7/13/2018 10:50 PM, John Stultz wrote: On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha On 7/11/2018 1:43 AM, John Stultz wrote: I worry

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/16/2018 10:44 PM, John Stultz wrote: On Mon, Jul 16, 2018 at 9:30 AM, John Stultz wrote: On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: On 7/13/2018 10:50 PM, John Stultz wrote: On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha On 7/11/2018 1:43 AM, John Stultz wrote: I worry

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 9:30 AM, John Stultz wrote: > On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: >> On 7/13/2018 10:50 PM, John Stultz wrote: >>> On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha On 7/11/2018 1:43 AM, John Stultz wrote: > I worry this upside-down logic is too

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 9:30 AM, John Stultz wrote: > On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: >> On 7/13/2018 10:50 PM, John Stultz wrote: >>> On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha On 7/11/2018 1:43 AM, John Stultz wrote: > I worry this upside-down logic is too

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: > On 7/13/2018 10:50 PM, John Stultz wrote: >> On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha >>> On 7/11/2018 1:43 AM, John Stultz wrote: I worry this upside-down logic is too subtle to be easily reasoned about, and will just lead to

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 9:17 AM, Mukesh Ojha wrote: > On 7/13/2018 10:50 PM, John Stultz wrote: >> On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha >>> On 7/11/2018 1:43 AM, John Stultz wrote: I worry this upside-down logic is too subtle to be easily reasoned about, and will just lead to

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/13/2018 10:50 PM, John Stultz wrote: On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha wrote: Hi John, Thanks for your response Please find my comments inline. On 7/11/2018 1:43 AM, John Stultz wrote: On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: Currently, there exists a corner

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/13/2018 10:50 PM, John Stultz wrote: On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha wrote: Hi John, Thanks for your response Please find my comments inline. On 7/11/2018 1:43 AM, John Stultz wrote: On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: Currently, there exists a corner

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-13 Thread John Stultz
On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha wrote: > Hi John, > > Thanks for your response > Please find my comments inline. > > > On 7/11/2018 1:43 AM, John Stultz wrote: >> >> On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: >>> >>> Currently, there exists a corner case assuming when there

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-13 Thread John Stultz
On Fri, Jul 13, 2018 at 12:13 AM, Mukesh Ojha wrote: > Hi John, > > Thanks for your response > Please find my comments inline. > > > On 7/11/2018 1:43 AM, John Stultz wrote: >> >> On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: >>> >>> Currently, there exists a corner case assuming when there

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-13 Thread Mukesh Ojha
Hi John, Thanks for your response Please find my comments inline. On 7/11/2018 1:43 AM, John Stultz wrote: On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: Currently, there exists a corner case assuming when there is only one clocksource e.g RTC, and system failed to go to suspend mode.

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-13 Thread Mukesh Ojha
Hi John, Thanks for your response Please find my comments inline. On 7/11/2018 1:43 AM, John Stultz wrote: On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: Currently, there exists a corner case assuming when there is only one clocksource e.g RTC, and system failed to go to suspend mode.

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-10 Thread John Stultz
On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: > Currently, there exists a corner case assuming when there is > only one clocksource e.g RTC, and system failed to go to > suspend mode. While resume rtc_resume() injects the sleeptime > as timekeeping_rtc_skipresume() returned 'false' (default

Re: [PATCH v3] time: Fix incorrect sleeptime injection when suspend fails

2018-07-10 Thread John Stultz
On Fri, Jul 6, 2018 at 6:17 AM, Mukesh Ojha wrote: > Currently, there exists a corner case assuming when there is > only one clocksource e.g RTC, and system failed to go to > suspend mode. While resume rtc_resume() injects the sleeptime > as timekeeping_rtc_skipresume() returned 'false' (default