public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Patrick's Test9 suspend code.
@ 2003-11-09 10:04 Rob Landley
  2003-11-13 13:08 ` Pavel Machek
  0 siblings, 1 reply; 25+ messages in thread
From: Rob Landley @ 2003-11-09 10:04 UTC (permalink / raw)
  To: mochel; +Cc: linux-kernel

So a few idiosyncrasies using patrick's suspend code (I.E. the one that 
actually works for me.  Mostly).

1) If you suspend a process (ctrl-z), suspend to disk, and the resume, the 
suspended process is unfrozen.  (Needless to say, this confuses bash job 
control a bit, since my shell is also unfrozen, so ctrl-c isn't doing 
anything here...)  Try it with a big make, it's fun. :)

2) "Snapshotting memory" is _really_slow_ for a CPU bound task on a 900 mhz 
celeron scanning the memory of a machine that has less than 200 megs of ram.  
My guess is that the "suspend all the hardware" phase accidentally put the 
CPU (or memory bus or some such) into a low-power state where it's still 
running, but at maybe 1/10th normal speed.

3) Suspend works about 90% of the time (echo -e "disk" > /sys/blah), but every 
once in a while I have one of two failure cases:

A) Either it panics (and then blanks the screen on my a few seconds later, yes 
I've tried switching that off with setterm -blank, if anything that made it 
happen faster after a panic.)

B) Or it resumes after the snapshot, booting back up to the desktop.  No 
"writing pages to disk" phase (that I've noticed).  Repeatedly telling it to 
suspend when it does this fails the same way, although I got it to suspend by 
exiting X afterwards and suspending from the console.  It's like there's an 
uninitialized variable on the stack that's getting crap in it, or something.  
(Nothing in the log about snapshotting having failed...)

This brings us to 2B) Snapshotting is way too opaque.  It sits there for 15 
seconds sometimes doing inscrutable things, with no progress indicator or 
anything, and then either suspends, panics, or fails and fires the desktop 
back up with no diagnostic message.

On the whole, this is really really cool, and if you have any suggestions how 
I could help, I'm all ears.  (I'm unlikely to poke into the code too 
extensively this week, converting the bzip compression-side code to C is 
still taking up my free time.  I may take a whack at it for kicks if there's 
some low hanging fruit, though.  But that tends to lead me down ratholes (see 
"bzip")...)

Rob

P.S.  Is there a mailing list to discuss this on?  I asked on the swsusp list 
and they said no, that was for discussing the work of nigel and pavel, and 
their stuff doesn't work for me.  I'm happy to be a guinea pig to test out 
new versions.  I backup my laptop regularly. :)

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Patrick's Test9 suspend code.
@ 2003-11-19 13:15 Samium Gromoff
  2003-11-19 19:06 ` Pavel Machek
  0 siblings, 1 reply; 25+ messages in thread
From: Samium Gromoff @ 2003-11-19 13:15 UTC (permalink / raw)
  To: pavel; +Cc: linux-kernel, rob


> > > > :-), Okay, we could make grub read /etc/fstab... But again user can do
> > > >
> > > > swapoff and swapon manually etc.
> > >
> > > During resume?
> >
> > No, imagine /dev/hda3 being set as swap in /etc/fstab, but user doing
> > swapoff /dev/hda3, swapon /dev/usb_zip_drive, then suspend.
> 
> A) Any scheme we come up with there will be a way the user can do something 
> stupid enough to break it.  (Put the swap partition on a ramdisk living on 
> the video card, or on a device require an initrd to load the driver to 
> access...)
> 
> B) A heuristic that looks at the mounted block devices for things that smell 
> like a resume partition would actually be more robust in that case.

Really, what i think here is appropriate is a more fundamental approach.

We should reserve a new partition type in addition to three already
existing, namely "linux"==0x83, "linux swap"==0x82 and "linux lvm"==0x8e.

And call it something like "linux suspend".
And initialize it, if needed (i presume to write a signature etc), with
something like "mksusp".

regards, Samium Gromoff

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Patrick's Test9 suspend code.
@ 2003-11-20 17:26 Shaheed
  2003-11-20 19:39 ` Rob Landley
  2003-11-21  0:06 ` Pavel Machek
  0 siblings, 2 replies; 25+ messages in thread
From: Shaheed @ 2003-11-20 17:26 UTC (permalink / raw)
  To: linux-kernel


> B) A heuristic that looks at the mounted block devices for things that smell 
> like a resume partition would actually be more robust in that case.

How about a static signature followed by a timestamp? That way, maybe we could 
have a resume menu like this:

/dev/hda3  (kernel 2.7.88, suspended on 01-04-2004 20:00:00)
/dev/hda4  (kernel 2.8.99, suspended on 31-05-2005 20:00:00) ***
Resume in 5..4..3..2..1..

with a 5 second countdown before it chooses the most recent? Or in Pavel's 
examples:

Erk! Nowhere to resume from! 

:-)

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

end of thread, other threads:[~2003-11-21 20:10 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-09 10:04 Patrick's Test9 suspend code Rob Landley
2003-11-13 13:08 ` Pavel Machek
2003-11-16  0:30   ` Rob Landley
2003-11-16 13:13     ` Pavel Machek
2003-11-17  2:38       ` Rob Landley
2003-11-17  8:42         ` Pavel Machek
2003-11-17 16:45         ` Patrick Mochel
2003-11-17 21:11           ` Rob Landley
2003-11-18 12:02           ` Rob Landley
2003-11-18 18:22             ` Pavel Machek
2003-11-18 22:12               ` Rob Landley
2003-11-18 23:21                 ` Pavel Machek
2003-11-19  5:26                   ` Rob Landley
2003-11-19  9:18                     ` Pavel Machek
2003-11-19  9:41                       ` Rob Landley
  -- strict thread matches above, loose matches on Subject: below --
2003-11-19 13:15 Samium Gromoff
2003-11-19 19:06 ` Pavel Machek
2003-11-20 17:26 Shaheed
2003-11-20 19:39 ` Rob Landley
2003-11-20 22:33   ` Shaheed
2003-11-20 22:41     ` Nigel Cunningham
2003-11-20 23:02       ` Shaheed
2003-11-21  6:46       ` Rob Landley
2003-11-21 20:09         ` Nigel Cunningham
2003-11-21  0:06 ` Pavel Machek

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