LWN.net Logo

Software suspend - again

Software suspend - again

Posted Feb 9, 2006 14:27 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246)
Parent article: Software suspend - again

While kdump requires a reserved bit of memory for dumping crashed kernels, I don't see why the same must be true for suspend. Can't this space be dynamically allocated, or is it a problem to guarantee sufficient contiguous memory on a whim?


(Log in to post comments)

My words.

Posted Feb 9, 2006 15:01 UTC (Thu) by hummassa (subscriber, #307) [Link]

The suspend kernel won't be big enough IMHO that contiguous memory will be
hard to get -- come on, we can implement it in less than 16k (4 pages)
can't we?

My words.

Posted Feb 9, 2006 16:52 UTC (Thu) by bronson (subscriber, #4806) [Link]

Only if you want to seriously restrict where the suspend image can be stored. Sure, custom-coding a non-DMA ATA-only suspend block can fit inside 16K.

But the minute you add SCSI, USB, FireWire, SATA, network filesystems, that code balloons out of control. That's not even counting LVM and partitioning issues. And, if the kernel has been running a long time, even 16K of contiguous memory becomes nontrivial to find.

So, yes, 16K is theoretically possible. But would it be useful? I doubt it.

My words.

Posted Feb 9, 2006 17:53 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246) [Link]

Indeed. And if you could fit the required code into 16K, it'd make perfect sense to preallocate it anyway. My understanding is that this would be more on the order of a couple-hundred kilobytes, since the suspend-to-disk kernel could omit most things, including the network stack. (I don't *quite* see the benefit of suspend-to-NFS.)

My words.

Posted Feb 9, 2006 21:31 UTC (Thu) by bronson (subscriber, #4806) [Link]

Diskless workstation? I admit, suspend-to-network is probably more trouble than it's worth.

My words.

Posted Feb 9, 2006 21:37 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246) [Link]

I had given that a brief thought, and it seems pretty worthless to me, IMHO, but then so do diskless workstations most of the time. If you did suspend-to-network on a diskless workstation, you could dump all the filesystem drivers (other than NFS) and disk drivers, trading one code lump for the other. You could probably even pare back most of the networking code if you were real spartan about it. (But you would need a reliable protocol like TCP to ensure it all works.)

I imagine suspend-to-network would be greated with the same enthusiasm as swap-to-network. :-)

suspend to network storage

Posted Feb 9, 2006 22:21 UTC (Thu) by pspinler (subscriber, #2922) [Link]

Is it worthless ? Hmm, maybe, but, what if you could restore the image to a different piece of (identical) hardware elsewhere ?

-- Pat

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds