public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	linux-pm@lists.linux-foundation.org,
	Marcel Holtmann <marcel@holtmann.org>
Subject: Re: Re: Possible problem with device_move()
Date: Fri, 3 Aug 2007 00:39:52 +0200	[thread overview]
Message-ID: <200708030039.53368.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0708021114240.2573-100000@iolanthe.rowland.org>

On Thursday, 2 August 2007 17:23, Alan Stern wrote:
> On Thu, 2 Aug 2007, Rafael J. Wysocki wrote:
> 
> > > > Well, my idea is not to change the order, but to create the list from scratch
> > > > when we need it and not in advance, because creating the list in advance
> > > > causes problems to appear.
> > > 
> > > Doing it that way will almost certainly result in a different order 
> > > from the one we have now.
> > 
> > Yes, but wouldn't that order be more accurate?
> 
> I'm not so sure.  There might be hidden dependencies, things we aren't
> aware of because they are automatically satisfied by
> order-of-discovery.  With an arbitrary parent-first traversal of the
> device tree those dependencies could be violated.
> 
> And then there are the weird possibilities created by device_move().  
> Isn't it possible that if an older child is moved under a younger 
> parent, we actually might _want_ to suspend the parent first?  Only the 
> driver doing the move would know for sure.
> 
> > > And it won't help the EHCI issue, because there the question is which of
> > > several siblings should come last. 
> > 
> > Why not?  If the device can indicate something like "place me after that one"
> > to the code creating the list, we can handle that too. 
> 
> Yes, but currently we don't have any way of indicating that.  And if we 
> did, it work work just as well with the current dpm_active list, right?

Well, I don't know. :-)

It seems the problem is _exactly_ that we have no means to represent the
dependencies between devices other than the order of registration and/or
the parent-child relationships.

Now, the simplest things that comes to mind is to do what we're doing (ie.
use the order of registration) with a modification allowing the exceptional
devices to have a "please move me to the end of list" flag set.  The PM core
would then browse the list during suspend and move the devices marked like
this to the end of dpm_active along with their children, if need be.

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-08-02 22:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-28 15:36 Possible problem with device_move() Alan Stern
2007-07-30  6:42 ` Cornelia Huck
2007-07-30 17:34   ` Alan Stern
2007-07-31  8:33     ` Cornelia Huck
2007-07-31 15:11       ` Alan Stern
2007-07-31 15:27         ` Rafael J. Wysocki
2007-07-31 15:30         ` Cornelia Huck
2007-07-31 18:17           ` Alan Stern
2007-07-31 19:12             ` Rafael J. Wysocki
2007-07-31 20:37               ` Alan Stern
2007-08-01 13:03                 ` Cornelia Huck
2007-08-01 15:22                   ` Alan Stern
2007-08-01 17:04                     ` Cornelia Huck
2007-08-01 17:35                       ` Alan Stern
2007-08-01 19:25                         ` Rafael J. Wysocki
2007-08-01 20:27                           ` Alan Stern
2007-08-02  8:06                             ` Cornelia Huck
2007-08-02 14:19                               ` Alan Stern
2007-08-02 14:50                                 ` Cornelia Huck
2007-08-02 11:21                             ` Rafael J. Wysocki
2007-08-02 14:24                               ` Alan Stern
2007-08-02 14:58                                 ` Rafael J. Wysocki
2007-08-02 15:23                                   ` Alan Stern
2007-08-02 22:39                                     ` Rafael J. Wysocki [this message]
2007-08-03 14:56                                       ` Alan Stern
2007-08-03 21:39                                         ` Rafael J. Wysocki
2007-08-06  9:31                                           ` Cornelia Huck
2007-08-06 13:53                                             ` Alan Stern
2007-07-30  6:53 ` Marcel Holtmann
2007-07-30 17:37   ` Alan Stern

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=200708030039.53368.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=cornelia.huck@de.ibm.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=marcel@holtmann.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