From: Pavel Machek <pavel@ucw.cz>
To: Dave Jones <davej@redhat.com>
Cc: linux-pm@osdl.org, Nigel Cunningham <ncunningham@linuxmail.org>,
"Victor Porton, , , " <porton@ex-code.com>
Subject: Re: Re: standby to disk transition
Date: Mon, 13 Mar 2006 22:46:53 +0100 [thread overview]
Message-ID: <20060313214652.GJ10348@elf.ucw.cz> (raw)
In-Reply-To: <20060313212856.GA16874@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]
On Po 13-03-06 16:28:56, Dave Jones wrote:
> On Mon, Mar 13, 2006 at 10:24:20PM +0100, Pavel Machek wrote:
>
> > > if suspend-to-disk is fast enough, you could just *always* write
> > > to disk, even if we're doing S3. If power runs out, you then have a
> > > valid resume image on-disk. iirc, this is what Windows does.
> >
> > Yep, I call that suspend-to-both. It is planned, but not really
> > trivial, and I'm a little busy. If someone wants to help....
>
> I was thinking a few days ago. With your move of all this stuff to
> userspace, if it was done in multiple stages, we could implement
> a form of checkpointing this way.
It is possible...
> So instead of doing the 'suspend to disk/ram' after 'write out all pages',
> we just continue.
...but it is not _that_ simple. Preparing video for suspend-to-ram is
rather nasty piece of code, and I'd rather not have it ran after
system is frozen. Sequence needs to be something like:
prepare video for s2ram, vbetool save if neccessary
FREEZE
SNAPSHOT
save image to disk
run s2ram
immediately after wakeup, s-t-disk signature needs to be removed,
otherwise we risk two resumes from one suspend.
> Why is this useful ? We've seen bugs reported that only ever bite customers
> after they've run their workload for a month. Now, if they had a means
> of checkpointing, then when it crashes, they could capture the last image
> that landed somewhere, and set that up for more tests/monitoring with kprobes etc
> and reproduce those hard-to-reproduce bugs a lot faster.
Yes, you can do it, but:
1) each SNAPSHOT takes few seconds, and it is rather disruptive
action -- includes console switch. It needs half of memory free.
2) it only snapshots memory. To be able to continue from saved
snapshot, you'd need to save swap partition and all mounted
filesystems.
Maybe you don't need 2) -- like kernel state is enough for you, or
maybe you can do some magic with device mapper.
Actually I have played with this idea myself. Running system entirely
on ramdisk would make periodic snapshots feasible, and it could do
tricks like system-level undo. Maybe I'll prepare some demo when I get
a time... Its probably going to be toy, through.
Pavel
--
113:
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-03-13 21:46 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 2:34 standby to disk transition Victor Porton,,,
2006-03-13 8:30 ` Pavel Machek
2006-03-13 8:48 ` Adam Belay
2006-03-13 8:50 ` Pavel Machek
2006-03-13 9:07 ` Adam Belay
2006-03-13 9:13 ` Pavel Machek
2006-03-13 18:33 ` Dave Jones
2006-03-13 21:24 ` Pavel Machek
2006-03-13 21:28 ` Dave Jones
2006-03-13 21:46 ` Pavel Machek [this message]
2006-03-13 22:06 ` Rafael J. Wysocki
2006-03-13 21:59 ` Nigel Cunningham
2006-03-13 22:08 ` Pavel Machek
2006-03-13 22:42 ` Rafael J. Wysocki
2006-03-13 23:11 ` Nigel Cunningham
2006-03-13 23:36 ` Rafael J. Wysocki
2006-03-14 0:18 ` Nigel Cunningham
2006-03-14 18:12 ` Rafael J. Wysocki
2006-03-14 20:33 ` Pavel Machek
2006-03-14 21:13 ` Rafael J. Wysocki
2006-03-14 21:22 ` Pavel Machek
2006-03-14 21:42 ` Alan Stern
2006-03-14 22:07 ` Rafael J. Wysocki
2006-03-15 15:14 ` Alan Stern
2006-03-14 21:57 ` Rafael J. Wysocki
2006-03-14 21:59 ` Pavel Machek
2006-03-15 0:22 ` suspend-to-both [was Re: Re: standby to disk transition] Pavel Machek
2006-03-14 20:29 ` Re: standby to disk transition Pavel Machek
2006-03-14 0:21 ` Nigel Cunningham
2006-03-14 9:50 ` Pavel Machek
2006-03-13 13:55 ` Nigel Cunningham
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=20060313214652.GJ10348@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=davej@redhat.com \
--cc=linux-pm@osdl.org \
--cc=ncunningham@linuxmail.org \
--cc=porton@ex-code.com \
/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