lkml.org 
[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [patch update] Re: [linux-pm] Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code)
    Date
    Am Mittwoch, 10. Juni 2009 21:27:56 schrieb Rafael J. Wysocki:
    > > What happens if the parent's parent is also suspended? It seems to me
    > > that you must code this recursively.
    >
    > Hmm, I thought I did.
    >
    > [Looks]
    >
    > pm_request_resume(dev) will call pm_request_resume(dev->parent), if
    > necessary, and that will call pm_request_resume(dev->parent->parent) and so
    > on.  Each of them will queue a work item and the one for the topmost parent
    > will be queued first.  So, the resume requests for all parents will be
    > executed before the one for the device, due to the fact that the workqueue
    > is singlethread.

    Sneaky, I overlooked that.

    > Well, there is a bug related to it, namely pm_autosuspend() may change the
    > status to RPM_SUSPENDED after pm_request_resume() has changed it to
    > RPM_WAKE, that needs fixing.

    Ok, maybe this is related. You recurse if the parent isn't in RPM_ACTIVE.
    But that is not enough. You must ensure that all the nodes higher up stay
    in RPM_ACTIVE. It seems to me that you must go up until you find an
    active node (or the root) and put it a blocked state.

    Regards
    Oliver

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-06-10 23:41    [W:0.022 / U:29.568 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site