From: John Stultz <john.stultz@linaro.org>
To: zhuo-hao.lee@intel.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
zhuohao.lee82@gmail.com
Subject: Re: [PATCH v2] alarmtimer: fix unexpected rtc interrupt when system resume from S3
Date: Fri, 13 Nov 2015 12:32:58 -0800 [thread overview]
Message-ID: <CANcMJZCA1XgbMRnGe5psZrvRT14uo_D3JZ5i+2R54inBLT7=UQ@mail.gmail.com> (raw)
In-Reply-To: <1446702614-26634-1-git-send-email-zhuo-hao.lee@intel.com>
On Wed, Nov 4, 2015 at 9:50 PM, <zhuo-hao.lee@intel.com> wrote:
> From: zhuo-hao <zhuo-hao.lee@intel.com>
>
If you could, please CC me on future submissions? I need to add an
entry to MAINTAINERS for alarmtimers. :)
> Before the system go to suspend (S3), if user create a timer with clockid
> CLOCK_REALTIME_ALARM/CLOCK_BOOTTIME_ALARM and set a "large" timeout value
> to this timer. The function alarmtimer_suspend will be called to setup
> a timeout value to RTC timer to avoid the system sleep over time. However,
> if the system wakeup early than RTC timeout, the RTC timer will not be cleared.
> And this will cause the hpet_rtc_interrupt come unexpectedly until the RTC
> timeout. To fix this problem, just adding alarmtimer_resume to cancel the
> RTC timer.
So conceptually the patch makes sense, though I'm not totally sure I
understand the failure you describe.
We have some alarmtimer set for 2 hours from now.
We suspend, and the alarmtimer code sets an rtctimer to wake us up in
2 hours week.
We resume a few minutes later due to user interaction or other
wakeups, but the rtctimer is still set.
A little less then two hours later (while the system has been awake
the whole time), the RTC hardware fires and we run the rtctimer.
???? Something problematic here w/ the hpet_rtc_interrupt?
The alarmtimer's hrtimer fires as normal.
Again, your fix seems reasonable, but I also feel like when the RTC
hardware spuriously fires and we trigger the rtctimer logic, there
shouldn't be any real problems there. So I want to make sure we're not
covering up some underlying issue w/ this fix.
thanks
-john
next prev parent reply other threads:[~2015-11-13 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 5:50 [PATCH v2] alarmtimer: fix unexpected rtc interrupt when system resume from S3 zhuo-hao.lee
2015-11-09 2:26 ` Lee, Zhuo-hao
2015-11-13 20:32 ` John Stultz [this message]
2015-11-14 14:12 ` Lee, Zhuo-hao
2015-11-16 18:00 ` Thomas Gleixner
2015-11-17 7:02 ` Lee, Zhuo-hao
2015-11-17 10:06 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANcMJZCA1XgbMRnGe5psZrvRT14uo_D3JZ5i+2R54inBLT7=UQ@mail.gmail.com' \
--to=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=zhuo-hao.lee@intel.com \
--cc=zhuohao.lee82@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).