From: Pranav Prasad <pranavpp@google.com>
To: tglx@linutronix.de, jstultz@google.com, sboyd@kernel.org
Cc: linux-kernel@vger.kernel.org, krossmo@google.com,
Pranav Prasad <pranavpp@google.com>
Subject: [PATCH v2 0/2] alarmtimer: Rework the suspend flow in alarmtimer
Date: Thu, 8 Feb 2024 19:56:20 +0000 [thread overview]
Message-ID: <20240208195622.758765-1-pranavpp@google.com> (raw)
Hi!
During the driver suspend phase of kernel suspend, alarmtimer's suspend
callback is invoked and it identifies the earliest next wakeup alarm and
programs that into the HW real time clock (RTC). However, there is an
exception to this process. If the next alarm is within the next 2 seconds,
the alarmtimer driver fails to suspend. In this case, a non-trivial amount
of power is spent to freeze and unfreeze all userspace processes and to
suspend and resume a number of devices. In the vast majority of cases, the
imminent alarm that caused the failure was likely already scheduled before
suspend even started. This provides an opportunity to reduce power
consumption if the suspend failure decision is made earlier in the suspend
flow, before the unnecessary extra work is done.
This patch series aims to achieve a kernel suspend flow in which the check
for an imminent alarm is performed early during the suspend prepare phase.
Changes from v1:
- Moved the pm_wakeup_event call to the PM notifier
- Added a check for RTC device in the PM notifier
Pranav Prasad (2):
alarmtimer: Create alarmtimer sysfs to make duration of kernel suspend
check configurable
alarmtimer: Modify alarmtimer suspend callback to check for imminent
alarm using PM notifier
kernel/time/alarmtimer.c | 183 ++++++++++++++++++++++++++++++---------
1 file changed, 143 insertions(+), 40 deletions(-)
--
2.43.0.687.g38aa6559b0-goog
next reply other threads:[~2024-02-08 19:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 19:56 Pranav Prasad [this message]
2024-02-08 19:56 ` [PATCH v2 1/2] alarmtimer: Create alarmtimer sysfs to make duration of kernel suspend check configurable Pranav Prasad
2024-02-09 20:01 ` John Stultz
2024-02-13 12:29 ` Thomas Gleixner
2024-02-08 19:56 ` [PATCH v2 2/2] alarmtimer: Modify alarmtimer suspend callback to check for imminent alarm using PM notifier Pranav Prasad
2024-02-09 19:30 ` John Stultz
2024-02-13 12:28 ` Thomas Gleixner
2024-02-13 20:30 ` Pranav Prasad
2024-02-13 22:38 ` Thomas Gleixner
2024-02-14 1:03 ` Pranav Prasad
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=20240208195622.758765-1-pranavpp@google.com \
--to=pranavpp@google.com \
--cc=jstultz@google.com \
--cc=krossmo@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
/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