From: Pavel Machek <pavel@ucw.cz>
To: Jeremy Maitin-Shepard <jbms@cmu.edu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Nigel Cunningham <nigel@nigel.suspend2.net>
Subject: Re: A kexec approach to hibernation
Date: Mon, 4 Jun 2007 12:46:21 +0200 [thread overview]
Message-ID: <20070604104621.GB4405@elf.ucw.cz> (raw)
In-Reply-To: <87k5un9l4n.fsf@jbms.ath.cx>
Hi!
> >> But kernel threads also rely on userspace, due to e.g. fuse and usermode
> >> helpers.
>
> > Yes, I know that and I think these issues are solvable within the current
> > approach.
>
> It seems like it would be very hard to get writing of an image to a
> fuse filesystem working under the current scheme.
>
> Trying to image a system while it is running seems fundamentally broken.
> As another example, I believe currently although devices are "quiesced"
> or stopped while the atomic snapshot is made, they are all then started
> again afterward while the image is written to disk. As a result, the
> network drivers will continue acking TCP packets that are received after
> the snapshot, but these packets will be lost.
>
> You might claim then that the solution is to simply keep the network
> driver quiesced or stopped. But then it is impossible to write the
> image over the network. The way to get around this problem is to write
> the image over the network using a fresh network stack.
The "fresh network stack" will RST any connections that were going,
which is ugly, too.
> >> Grub, its configuration, and the kernel used to resume the system had
> >> better be on a "safe" filesystem already (i.e. a separate, unmounted
> >> before hibernation /boot).
>
> > Currently, you don't need to do that.
>
> Some people get away with it, but fundamentally it is broken to do so.
> (The fact that the current software suspend implementations tell the
> filesystems to sync to disk increases its chances of working.) You are
> accessing a filesystem that is in an unknown state. Consider that the
> user might make a change to grub.conf, but the kernel caches the write.
> If the filesystem containing grub.conf is left mounted, the write might
> never reach disk before the system is hibernated. As a result, when
> grub attempts to read it, it doesn't get the expected data.
sync is perfectly safe way of telling the fs to store data on disk.
> >> That is why I think the kexec solution is the elegant solution.
>
> > Frankly, I think it's tricky. ;-)
>
> To me, it seems a lot easier to get right than the current approaches.
Well, you are certainly welcome to create the patch. "suspend3" name
is still free, AFAICT.
If _I_ were willing to add some runtime overhead to make hibernation
simpler, I'd just use some virtualization to do that... with added
advantage of "hibernate here, resume on different hw".
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-06-04 10:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 20:39 Jeremy Maitin-Shepard
2007-06-01 21:39 ` Rafael J. Wysocki
2007-06-01 22:25 ` Jeremy Maitin-Shepard
2007-06-01 23:14 ` Rafael J. Wysocki
2007-06-01 23:54 ` Jeremy Maitin-Shepard
2007-06-02 0:33 ` Rafael J. Wysocki
2007-06-02 1:54 ` Jeremy Maitin-Shepard
2007-06-02 9:22 ` Rafael J. Wysocki
2007-06-04 10:46 ` Pavel Machek [this message]
2007-06-04 12:20 ` Matthew Garrett
2007-06-04 13:10 ` Pavel Machek
2007-06-04 13:16 ` Matthew Garrett
2007-06-11 2:02 ` H. Peter Anvin
2007-06-11 22:44 ` Nigel Cunningham
2007-06-04 22:09 ` Jeremy Maitin-Shepard
2007-06-04 22:36 ` Nigel Cunningham
2007-06-05 8:15 ` Xavier Bestel
2007-06-05 9:34 ` Stefan Seyfried
2007-06-05 9:40 ` Xavier Bestel
2007-06-04 22:51 ` Pavel Machek
2007-06-11 15:07 ` Jeremy Maitin-Shepard
2007-06-11 3:40 ` Nigel Cunningham
2007-06-11 15:01 ` Jeremy Maitin-Shepard
2007-06-11 15:45 ` Xavier Bestel
2007-06-11 15:51 ` Jeremy Maitin-Shepard
2007-06-11 16:03 ` Xavier Bestel
2007-06-11 17:05 ` Jeremy Maitin-Shepard
2007-06-04 4:40 ` Vivek Goyal
2007-06-04 5:22 ` Nigel Cunningham
2007-06-04 8:05 ` Rafael J. Wysocki
2007-06-04 8:14 ` Nigel Cunningham
2007-06-04 21:44 ` Jeremy Maitin-Shepard
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=20070604104621.GB4405@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=jbms@cmu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=nigel@nigel.suspend2.net \
--cc=rjw@sisk.pl \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®