From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org, linux-omap@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>,
Ming Lei <tom.leiming@gmail.com>
Subject: Re: [linux-pm] [PATCH] PM: runtime PM + idle: allow usage when interrupts are disabled
Date: Mon, 23 Aug 2010 08:24:55 -0700 [thread overview]
Message-ID: <87y6bxz708.fsf@deeprootsystems.com> (raw)
In-Reply-To: <201008210127.46934.rjw@sisk.pl> (Rafael J. Wysocki's message of "Sat, 21 Aug 2010 01:27:46 +0200")
"Rafael J. Wysocki" <rjw@sisk.pl> writes:
> On Thursday, August 19, 2010, Kevin Hilman wrote:
>> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
>>
>> > On Tuesday, August 10, 2010, Kevin Hilman wrote:
>> >> When using runtime PM in combination with CPUidle, the runtime PM
>> >> transtions of some devices may be triggered during the idle path.
>> >> Late in the idle sequence, interrupts will likely be disabled when
>> >> runtime PM for these devices is initiated.
>> >>
>> >> Currently, the runtime PM core assumes methods are called with
>> >> interrupts enabled. However, if it is called with interrupts
>> >> disabled, the internal locking unconditionally enables interrupts, for
>> >> example:
>> >>
>> >> pm_runtime_put_sync()
>> >
>> > Please don't use that from interrupt context.
>>
>> I'm not using this in interrupt context. I'm using it in process
>> context where interrupts are disabled, specifically, the idle thread.
>>
>> > There's pm_runtime_put() exactly for this purpose that puts the
>> > _idle() call into a workqueue.
>> *
>> If I'm in my CPU's idle path, I don't want to activate a workqueue
>> because then I'll no longer be idle.
>
> Well, what about:
>
> -> idle
> -> check if devices have been suspended
> - enter idle if so
> - call pm_request_idle() for devices
>
> The workqueue will activate and put the devices into low-power states and
> then your idle callback will be called again, with the devices suspended.
The problem with this is that after we leave idle, the decision about
which C-state to enter will likely change, which will affect the set of
devices that need to be suspended. I'm not sure this will be an
entirely predictable process with current CPUidle governors, but it
certainly merits some more experiments.
Kevin
next prev parent reply other threads:[~2010-08-23 15:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 16:54 [PATCH] PM: runtime PM + idle: allow usage when interrupts are disabled Kevin Hilman
2010-08-14 1:15 ` Alan Stern
2010-08-14 1:15 ` [linux-pm] " Alan Stern
2010-08-19 21:30 ` Kevin Hilman
2010-08-19 21:30 ` [linux-pm] " Kevin Hilman
2010-08-20 14:14 ` Alan Stern
2010-08-23 15:22 ` Kevin Hilman
2010-08-23 15:22 ` [linux-pm] " Kevin Hilman
2010-08-20 14:14 ` Alan Stern
2010-08-23 7:18 ` Pavel Machek
2010-08-23 7:18 ` [linux-pm] " Pavel Machek
2010-08-14 3:38 ` Ming Lei
2010-08-14 3:38 ` Ming Lei
2010-08-16 21:18 ` Rafael J. Wysocki
2010-08-16 21:18 ` [linux-pm] " Rafael J. Wysocki
2010-08-19 11:02 ` Basak, Partha
2010-08-19 11:02 ` [linux-pm] " Basak, Partha
2010-08-19 21:37 ` Kevin Hilman
2010-08-20 23:27 ` Rafael J. Wysocki
2010-08-23 15:24 ` Kevin Hilman [this message]
2010-08-23 15:24 ` Kevin Hilman
2010-08-20 23:27 ` Rafael J. Wysocki
2010-08-19 21:37 ` Kevin Hilman
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=87y6bxz708.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
--cc=tom.leiming@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 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.