From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: Adding pm_schedule_idle(), maybe removing pm_schedule_suspend()
Date: Wed, 25 Nov 2009 23:47:59 +0100 [thread overview]
Message-ID: <200911252347.59485.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0911251704580.2812-100000@iolanthe.rowland.org>
On Wednesday 25 November 2009, Alan Stern wrote:
> Rafael:
>
> It turns out that I need a pm_schedule_idle() routine.
> pm_schedule_suspend() just doesn't do what I want -- I need the
> runtime_idle() callback to be invoked when the timer expires, not
> runtime_suspend().
>
> Adding the routine itself is easy enough, but the obvious way to
> implement it is to use dev->power.request to tell the timer function
> whether it should queue an idle or a suspend. This leads to a problem:
> It becomes impossible to queue an idle request if there's a scheduled
> suspend. The reason is that power.request has to remain set to
> indicate that a suspend should be queued when the timer expires, so it
> can't be changed to RPM_REQ_IDLE.
>
> One possible way around this would be to have pm_schedule_idle()
> completely replace pm_schedule_suspend(). This seems like a reasonable
> approach -- at the time of the function call we don't know what
> conditions will be like in the future, so when the timer expires we
> should check again to see if a suspend is appropriate.
>
> What do you think?
I'm against that. In fact I have a usage case that would be broken by this
change.
What exactly is your usage scenario?
Rafael
next prev parent reply other threads:[~2009-11-25 22:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 22:32 Adding pm_schedule_idle(), maybe removing pm_schedule_suspend() Alan Stern
2009-11-25 22:47 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-11-26 16:43 Alan Stern
2009-11-27 0:53 ` Rafael J. Wysocki
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=200911252347.59485.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/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