From: John Stultz <john.stultz@linaro.org>
To: Todd Poynor <toddpoynor@google.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, arve@android.com
Subject: Re: [PATCH] alarmtimer: implement minimum alarm interval for allowing suspend
Date: Thu, 09 Aug 2012 14:27:39 -0700 [thread overview]
Message-ID: <50242B4B.4090607@linaro.org> (raw)
In-Reply-To: <1344497847-7161-1-git-send-email-toddpoynor@google.com>
On 08/09/2012 12:37 AM, Todd Poynor wrote:
> alarmtimer suspend return -EBUSY if the next alarm will fire in less
> than 2 seconds. This allows one RTC seconds tick to occur subsequent
> to this check before the alarm wakeup time is set, ensuring the wakeup
> time is still in the future (assuming the RTC does not tick one more
> second prior to setting the alarm).
>
> If suspend is rejected due to an imminent alarm, hold a wakeup source
> for 2 seconds to process the alarm prior to reattempting suspend.
>
> If setting the alarm incurs an -ETIME for an alarm set in the past,
> or any other problem setting the alarm, abort suspend and hold a
> wakelock for 1 second while the alarm is allowed to be serviced or
> other hopefully transient conditions preventing the alarm clear up.
>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> ---
> kernel/time/alarmtimer.c | 18 +++++++++++++-----
> 1 files changed, 13 insertions(+), 5 deletions(-)
Thanks for sending this in!
I've gone ahead and queued it for 3.7 (with the minor tweak Rafael
suggested). I'll try to do some further testing of the edge case this
handles as well.
thanks again,
-john
next prev parent reply other threads:[~2012-08-09 21:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 7:37 [PATCH] alarmtimer: implement minimum alarm interval for allowing suspend Todd Poynor
2012-08-09 9:31 ` Rafael J. Wysocki
2012-08-09 21:06 ` John Stultz
2012-08-09 21:09 ` John Stultz
2012-08-09 21:27 ` John Stultz [this message]
2012-08-09 23:41 ` Arve Hjønnevåg
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=50242B4B.4090607@linaro.org \
--to=john.stultz@linaro.org \
--cc=arve@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=toddpoynor@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.