From: Charan Teja Kalla <quic_charante@quicinc.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: <len.brown@intel.com>, <pavel@kernel.org>,
<gregkh@linuxfoundation.org>, <dakr@kernel.org>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Patrick Daly <quic_pdaly@quicinc.com>
Subject: Re: [PATCH] PM-runtime: fix denying of auto suspend in pm_suspend_timer_fn
Date: Sun, 18 May 2025 12:13:07 +0530 [thread overview]
Message-ID: <e3d44759-e004-4bfc-b21f-7a8cf47ab7c5@quicinc.com> (raw)
In-Reply-To: <CAJZ5v0hanp631h_VGijY5Joj=tQn=sENnzu5AZDuqWsMiOi+mw@mail.gmail.com>
Hi Rafael,
On 5/17/2025 1:36 AM, Rafael J. Wysocki wrote:
>> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
>> index 205a4f8828b0..c55a7c70bc1a 100644
>> --- a/drivers/base/power/runtime.c
>> +++ b/drivers/base/power/runtime.c
>> @@ -1011,7 +1011,7 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer)
>> * If 'expires' is after the current time, we've been called
>> * too early.
>> */
>> - if (expires > 0 && expires < ktime_get_mono_fast_ns()) {
>> + if (expires > 0 && expires <= ktime_get_mono_fast_ns()) {
>> dev->power.timer_expires = 0;
>> rpm_suspend(dev, dev->power.timer_autosuspends ?
>> (RPM_ASYNC | RPM_AUTO) : RPM_ASYNC);
>> --
> Applied as 6.16 material, thanks!
Can you help me with why 'expires < ktime_get_mono_fast_ns())' is there?
We know that a timer callback is never going to get called before its
expiry. May be removal of this check altogether is the proper fix?
Thanks,
Charan
prev parent reply other threads:[~2025-05-18 6:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 6:41 Charan Teja Kalla
2025-05-16 20:06 ` Rafael J. Wysocki
2025-05-18 6:43 ` Charan Teja Kalla [this message]
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=e3d44759-e004-4bfc-b21f-7a8cf47ab7c5@quicinc.com \
--to=quic_charante@quicinc.com \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=quic_pdaly@quicinc.com \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®