public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with PM_FREEZE
@ 2005-09-24  2:09 Alan Stern
  2005-09-27 12:26 ` Pavel Machek
  0 siblings, 1 reply; 41+ messages in thread
From: Alan Stern @ 2005-09-24  2:09 UTC (permalink / raw)
  To: Linux-pm mailing list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1561 bytes --]

A problem with the PM_FREEZE state has surfaced recently.

It has to do with the device state recorded in the memory image.  When the 
image is made, devices are in the FREEZE state, and that's what gets 
recorded.  But then the image is written to disk and devices are put into 
SUSPEND.

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.

What's the correct way to handle this?  On possible solution would be to
let drivers know when a resume call is returning from a system sleep.  
When that happens drivers can safely assume that the devices really are
in SUSPEND, no matter what the recorded states say.


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 made, the device is resumed in
order to write the image to a swap partition.  When that happens the I/O
queue will start running again, briefly.  Those pending writes will be 
carried out.

Then when the system wakes up, the pending requests will be restored along
with the rest of the image.  But they have already been recorded on the
disk.  I can imagine that with some kinds of filesystem this might lead to
an error (although I don't know how).


Any comments?

Alan Stern


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2005-09-29 19:01 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox