From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Aaron Lu <aaron.lu@intel.com>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Lan Tianyu <tianyu.lan@intel.com>
Subject: Re: [PATCH] ACPI / power: Drop automaitc resume of power resource dependent devices
Date: Thu, 17 Oct 2013 15:47 +0200 [thread overview]
Message-ID: <2220996.Balj6KfZAP@vostro.rjw.lan> (raw)
In-Reply-To: <3517410.N1Ot4TpM2j@vostro.rjw.lan>
On Thursday, October 17, 2013 01:56:23 PM Rafael J. Wysocki wrote:
> On Thursday, October 17, 2013 02:57:12 PM Aaron Lu wrote:
> > On 10/16/2013 09:25 PM, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > The mechanism causing devices depending on a given power resource
> > > (that is, devices that can be in D0 only if that power resource is
> > > on) to be resumed automatically when the power resource is turned
> > > on (and their "inferred" power state becomes D0 as a result) is
> > > inherently racy and in fact unnecessary.
> > >
> > > It is racy, because if the power resources is turned on and then
> > > immediately off, the device resume triggered by the first transition
> > > to "on" may still happen, causing the power resource to be turned
> > > on again. That again will trigger the "resume of dependent devices"
> > > mechanism, but if the devices in question are not in use, they will
> > > be suspended in the meantime causing the power resource to be turned
> > > off. However, the "resume of dependent devices" will next resume
> > > them again and so on. In some cases (USB port PM in particular) that
> > > leads to an endless busy loop of flipping the resource on and off
> > > continuously.
> > >
> > > It is needless, because whoever turns a power resource on will most
> > > likely turn it off at some point and the devices that go into "D0"
> > > as a result of turning it on will then go back into D3cold.
> > > Moreover, turning all power resources a device needs to go into
> > > D0 is not sufficient for a full transition into D0 in general.
> > > Namely, _PS0 may need to be executed in addition to that in some
> > > cases. This means that the whole rationale of the "resume of
> > > dependent devices" mechanism was incorrect to begin with and it's
> > > best to remove it entirely.
> >
> > With this patch, your previous patch could also be applied now:
> > https://lkml.org/lkml/2013/6/14/173
> > [PATCH 4/4] ACPI / PM: Drop two functions that are not used any more
>
> Good catch and that code is dead anyway AFAICS, because power_dependent is only
> used in device_pm.c (in those two functions) and in scan.c (where it is
> initialized).
That obviously is with the $subject patch applied.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2013-10-17 13:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 13:25 [PATCH] ACPI / power: Drop automaitc resume of power resource dependent devices Rafael J. Wysocki
2013-10-17 6:57 ` Aaron Lu
2013-10-17 11:56 ` Rafael J. Wysocki
2013-10-17 13:47 ` Rafael J. Wysocki [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=2220996.Balj6KfZAP@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=aaron.lu@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=tianyu.lan@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox