From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>,
Kernel development list <linux-kernel@vger.kernel.org>,
Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: Re: [linux-pm] Fundamental flaw in system suspend, exposed by freezer removal
Date: Mon, 3 Mar 2008 23:56:34 +0100 [thread overview]
Message-ID: <200803032356.35275.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0803031626180.8280-100000@iolanthe.rowland.org>
On Monday, 3 of March 2008, Alan Stern wrote:
> On Mon, 3 Mar 2008, Rafael J. Wysocki wrote:
>
> > > > Of course, it won't be necessary if the ->suspend_begin() methods are called
> > > > in an initial forward pass through dpm_active.
> > >
> > > Right. That would be simpler.
>
> Let's stick with that for now.
>
> What about on the resume side? Do you want to prevent child
> registrations until after end_sleep has run? Or would you be okay with
> allowing the resume method to register new children?
I think ->resume() can register new children. There's nothing wrong with
that from the core's standpoint.
> It should be safe to assume that drivers are smart enough to bring the device
> back to full power before looking for new children.
Well, it would be a bug not to do so.
> In fact, maybe we don't need an end_sleep method at all. There isn't
> any synchronization issue to worry about -- drivers aren't going to
> register their new children in a suspended state!
Agreed.
> > > > That's correct. Perhaps we should change device_add().
> > >
> > > I had a change like that in my version of the patch. It's excerpted
> > > below.
> >
> > Hm, I wonder why you didn't move dpm_sysfs_add() along with device_pm_add()?
>
> Because I didn't think of it. :-)
>
> > Perhaps it's better to include dpm_sysfs_add() into device_pm_add(), since we
> > are going the make the return a result anyway?
>
> Yes.
Okay, I'll prepare a patch for that, on top of the one introducing the
'sleeping' field into 'struct dev_pm_info' (posting in a while).
> > > > I thought ->suspend() would be mandatory, even if it's to be empty.
> > >
> > > There's no need for that. If it isn't implemented, treat it as though
> > > it was successful.
> >
> > Well, I'm not sure. Right now we have a problem with distinguishing drivers
> > that don't implement ->suspend() purposefully from the ones that just don't
> > support suspend/hibernation ...
> >
> > OTOH, since we are going to have a pointer to 'struct pm_ops', we can safely
> > assume that if it's not NULL, the driver writer knows what he's doing.
>
> That's reasonable. If a driver doesn't support PM then it won't have
> a pm_ops pointer.
Exactly.
The question remains what we're going to do with the drivers without pm_ops
pointers in the long run (in the short run we will use the legacy callbacks in
that cases, if defined).
Thanks,
Rafael
next prev parent reply other threads:[~2008-03-03 22:57 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-25 15:39 Alan Stern
2008-02-25 19:46 ` [linux-pm] " Alan Stern
2008-02-25 22:25 ` Rafael J. Wysocki
2008-02-25 23:37 ` Alan Stern
2008-02-26 0:07 ` Rafael J. Wysocki
2008-02-26 15:49 ` Alan Stern
2008-02-26 23:17 ` Rafael J. Wysocki
2008-02-27 16:03 ` Alan Stern
2008-02-27 19:50 ` Rafael J. Wysocki
2008-02-27 20:15 ` Alan Stern
2008-02-28 22:49 ` Alan Stern
2008-02-29 0:01 ` Rafael J. Wysocki
2008-02-29 14:26 ` Rafael J. Wysocki
2008-02-29 15:53 ` Alan Stern
2008-02-29 17:02 ` Rafael J. Wysocki
2008-02-29 18:42 ` Alan Stern
2008-02-29 21:57 ` Rafael J. Wysocki
2008-02-29 22:46 ` Alan Stern
2008-03-01 0:13 ` Rafael J. Wysocki
2008-03-01 15:30 ` Alan Stern
2008-03-02 13:37 ` Rafael J. Wysocki
2008-03-02 16:22 ` Alan Stern
2008-03-02 19:11 ` Rafael J. Wysocki
2008-03-03 3:54 ` Alan Stern
2008-03-03 16:32 ` Rafael J. Wysocki
2008-03-03 17:43 ` Alan Stern
2008-03-03 20:47 ` Rafael J. Wysocki
2008-03-03 22:48 ` Alan Stern
2008-03-03 22:56 ` Rafael J. Wysocki [this message]
2008-03-03 23:12 ` Alan Stern
2008-03-03 23:18 ` Rafael J. Wysocki
2008-02-26 7:13 ` David Brownell
2008-02-26 8:25 ` David Newall
2008-02-26 9:16 ` David Brownell
2008-02-26 13:36 ` David Newall
2008-02-26 15:58 ` Alan Stern
2008-02-25 22:24 ` Rafael J. Wysocki
2008-02-27 20:36 ` Benjamin Herrenschmidt
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=200803032356.35275.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=astarikovskiy@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.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
all inboxes | Powered by JetHome®