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 <[email protected]>
> > > 
> > > 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to