From: Pavel Machek <pavel@ucw.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: Problems with PM_FREEZE
Date: Tue, 27 Sep 2005 21:58:33 +0200 [thread overview]
Message-ID: <20050927195833.GA2040@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0509271455140.636-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
Hi!
> > > Later on, when the system wakes up and the image is restored, drivers are
> > > asked to resume the devices. The problem is that now the drivers think
> > > the devices are in FREEZE when in fact they are really in SUSPEND. The
> > > difference is significant and it can cause errors in the resume procedure.
> >
> > No; devices are in FREEZE if their driver was in kernel, and in some kind
> > of power up state when not. Drivers should just handle both.
>
> For USB, that "some kind of power up state" will in fact be SUSPEND.
>
> Drivers should just handle both -- how? Do a full resume in either case?
> Doesn't that go against the whole idea of FREEZE, that it could be
> implemented without some of the overhead of SUSPEND?
>
> Well, I guess the FREEZE transition could still avoid that overhead. But
> the RESUME-from-FREEZE transition ought to be able to avoid it also, and
> you've just shown that it can't afford to.
We can add a hint to pm_message_t. But for "full resume", we really
don't know if devices are only FROZEN or if they need full reinit.
So you may get info "only frozen" and "maybe frozen, maybe it was
powered down"; if you think that helps the drivers, just add a field
to pm_message_t (flags), and add this as a first flag.
> > > Here's another, slightly more far-fetched problem. I don't know if this
> > > can come up in actual practice.
> > >
> > > When a disk device is put in FREEZE, there may be pending write requests
> > > in its I/O queue. After the image has been
> > Can they? If so, we need to solve that somehow.
>
> I don't know. It depends on how the disk driver implements FREEZE. Does
> it drain the queue, or does it merely plug the queue?
...actually it does not matter for disk driver, because two writes
with same data are harmless. It may still matter for network (repeated
packets).
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-09-27 19:58 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-24 2:09 Problems with PM_FREEZE Alan Stern
2005-09-27 12:26 ` Pavel Machek
2005-09-27 19:02 ` Alan Stern
2005-09-27 19:58 ` Pavel Machek [this message]
2005-09-27 20:25 ` Alan Stern
2005-09-27 20:32 ` Pavel Machek
2005-09-27 21:30 ` Nigel Cunningham
2005-09-27 22:01 ` Pavel Machek
2005-09-27 23:19 ` Nigel Cunningham
2005-09-28 2:58 ` Alan Stern
2005-09-28 3:27 ` Nigel Cunningham
2005-09-28 15:46 ` David Brownell
2005-09-28 16:17 ` Alan Stern
2005-09-28 20:53 ` Pavel Machek
2005-09-28 21:15 ` Alan Stern
2005-09-28 21:18 ` Pavel Machek
2005-09-28 21:20 ` David Brownell
2005-09-28 21:22 ` Pavel Machek
2005-09-28 13:03 ` Pavel Machek
2005-09-29 15:45 ` Alan Stern
2005-09-29 17:12 ` David Brownell
2005-09-29 17:31 ` Pavel Machek
2005-09-29 18:22 ` David Brownell
2005-09-29 19:01 ` Rafael J. Wysocki
2005-09-29 17:49 ` Alan Stern
2005-09-28 13:04 ` Pavel Machek
2005-09-28 13:51 ` Rafael J. Wysocki
2005-09-28 18:54 ` Alan Stern
2005-09-28 19:09 ` Rafael J. Wysocki
2005-09-28 19:31 ` Alan Stern
2005-09-28 20:51 ` Pavel Machek
2005-09-28 21:13 ` Alan Stern
2005-09-28 21:19 ` Pavel Machek
2005-09-28 21:56 ` Rafael J. Wysocki
2005-09-28 22:01 ` Pavel Machek
2005-09-28 22:14 ` Rafael J. Wysocki
2005-09-28 20:51 ` Pavel Machek
2005-09-28 21:08 ` David Brownell
2005-09-28 21:13 ` Pavel Machek
2005-09-28 21:12 ` Alan Stern
2005-09-28 15:28 ` David Brownell
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=20050927195833.GA2040@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-pm@lists.osdl.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