2003-09-19 10:15:52

by MånsRullgård

[permalink] [raw]
Subject: Re: Resuming from software suspend

Nigel Cunningham <[email protected]> writes:

> If your filesystems were mounted readonly and the boot won't mount them
> writable, you should be fine with no special precautions. Last time I
> looked at 2.6 code, it didn't fix the suspend header when you use
> noresume. If that's still true, you should be able to boot with the
> noresume option, and then later normally.

What I want to do is boot, do some things, and then resume the
suspended state without rebooting between. Is that possible? I don't
see any reason why it should be impossible to do, even if it's not
currently supported.

--
M?ns Rullg?rd
[email protected]


2003-09-19 10:33:48

by Nigel Cunningham

[permalink] [raw]
Subject: Re: Resuming from software suspend

Provided you're not making the data of the filesystem inconsistent with
the state that the suspended image is expecting to see, you won't get
any corruption. As to beginning a resume without rebooting, whether it
would work would depend upon the size of the image, the amount of memory
used when you start the resume and the degree of overlap between the two
sets of memory.

Regards,

Nigel

On Fri, 2003-09-19 at 22:15, M?ns Rullg?rd wrote:
> Nigel Cunningham <[email protected]> writes:
>
> > If your filesystems were mounted readonly and the boot won't mount them
> > writable, you should be fine with no special precautions. Last time I
> > looked at 2.6 code, it didn't fix the suspend header when you use
> > noresume. If that's still true, you should be able to boot with the
> > noresume option, and then later normally.
>
> What I want to do is boot, do some things, and then resume the
> suspended state without rebooting between. Is that possible? I don't
> see any reason why it should be impossible to do, even if it's not
> currently supported.
--
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

You see, at just the right time, when we were still powerless,
Christ died for the ungodly.
-- Romans 5:6, NIV.

2003-09-19 13:34:19

by Bas Mevissen

[permalink] [raw]
Subject: Re: Resuming from software suspend

M?ns Rullg?rd wrote:

> What I want to do is boot, do some things, and then resume the
> suspended state without rebooting between. Is that possible? I don't
> see any reason why it should be impossible to do, even if it's not
> currently supported.
>

Just after booting, you know the state of the hardware (just initialised
for most things that are not used to /boot/start resume/ from). You need
to get the hardware in a sort of just-booted state before revering to
the swsusp image you saved earlier because the drivers (might) expect
the hardware to be in a certain state when they are started up by swsusp.

So you have to be carefull about the hardware (and not only the
filesystem) state just before reverting to the swsusp image.

Bas.



2003-09-22 10:15:04

by Pavel Machek

[permalink] [raw]
Subject: Re: Resuming from software suspend

Hi!

> What I want to do is boot, do some things, and then resume the
> suspended state without rebooting between. Is that possible? I don't
> see any reason why it should be impossible to do, even if it's not
> currently supported.

Its not impossible, its just pretty tricky. You'd have to kill all
userland and bring devices back to sane state.
(It is also going to be very tricky to *test*.)
Pavel
--
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...