Re: Back to the future.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rafael J. Wysocki
Date: Saturday, April 28, 2007 - 3:35 am

On Friday, 27 April 2007 12:12, Pekka J Enberg wrote:

Well, swsusp currently does almost the same, except that you can read the
image from the kernel as a stream of bytes, using read() and, during the
restore phase, upload the same image using write().  The advantage of this
is that the interface is symmetrical from the user space's point of view.
[You're cancelling the hibernation by closing /dev/snapshot, which also is
quite natural.]

If you look at the interface in user.c, there are only two ioctls really needed
for that in there, SNAPSHOT_ATOMIC_SNAPSHOT and
SNAPSHOT_ATOMIC_RESTORE.  Two more are handy for freezing
tasks, SNAPSHOT_FREEZE and SNAPSHOT_UNFREEZE.  The others were added
later, to make the user space part simpler or capable of doing some fancy
stuff, which I am ready to admit was a mistake.


Yes, and that's why we wanted to introduce the userland part.  The problem
with this approach, as it's turned out, is that the userland part must be a
very specialized piece of software, really careful of what it's doing, mainly
because of the inability to checkpoint filesystems.  If we could checkpoint
filesystems and were able to unfreeze the user space after creating the
snapshot without the risk of corrupting filesystems in the restore phase,
the userland part could be much simpler (even as simple as Linus suggested).

Greetings,
Rafael
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Back to the future., Nigel Cunningham, (Wed Apr 25, 11:04 pm)
Re: Back to the future., Pekka Enberg, (Thu Apr 26, 12:28 am)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 12:42 am)
Re: Back to the future., Pekka Enberg, (Thu Apr 26, 1:17 am)
Re: Back to the future., Jan Engelhardt, (Thu Apr 26, 1:38 am)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 2:28 am)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 2:33 am)
Re: Back to the future., Linus Torvalds, (Thu Apr 26, 9:56 am)
Re: Back to the future., Xavier Bestel, (Thu Apr 26, 10:03 am)
Re: Back to the future., Linus Torvalds, (Thu Apr 26, 10:07 am)
Re: Back to the future., Luca Tettamanti, (Thu Apr 26, 10:29 am)
Re: Back to the future., Linus Torvalds, (Thu Apr 26, 10:34 am)
Re: Back to the future., Chase Venters, (Thu Apr 26, 11:22 am)
Re: Back to the future., David Lang, (Thu Apr 26, 11:50 am)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 12:56 pm)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 1:08 pm)
Re: Back to the future., Linus Torvalds, (Thu Apr 26, 1:45 pm)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 1:50 pm)
Re: Back to the future., Theodore Tso, (Thu Apr 26, 2:38 pm)
Re: Back to the future., Rafael J. Wysocki, (Thu Apr 26, 3:08 pm)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 3:20 pm)
Re: Back to the future., David Lang, (Thu Apr 26, 3:24 pm)
Re: Back to the future., Pavel Machek, (Thu Apr 26, 3:40 pm)
Re: Back to the future., Pavel Machek, (Thu Apr 26, 3:42 pm)
Re: Back to the future., David Lang, (Thu Apr 26, 3:49 pm)
Re: Back to the future., David Lang, (Thu Apr 26, 3:56 pm)
Re: Back to the future., Pavel Machek, (Thu Apr 26, 4:12 pm)
Re: Back to the future., Linus Torvalds, (Thu Apr 26, 4:15 pm)
Re: Back to the future., Pavel Machek, (Thu Apr 26, 4:27 pm)
Re: Back to the future., Olivier Galibert, (Thu Apr 26, 5:10 pm)
Re: Back to the future., Olivier Galibert, (Thu Apr 26, 5:23 pm)
Re: Back to the future., Pekka J Enberg, (Thu Apr 26, 9:52 pm)
Re: Back to the future., Pekka Enberg, (Thu Apr 26, 10:41 pm)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 11:08 pm)
Re: Back to the future., Pekka J Enberg, (Thu Apr 26, 11:18 pm)
Re: Back to the future., Pekka J Enberg, (Thu Apr 26, 11:29 pm)
Re: Back to the future., Nigel Cunningham, (Thu Apr 26, 11:34 pm)
Re: Back to the future., Pekka J Enberg, (Thu Apr 26, 11:50 pm)
Re: Back to the future., Nigel Cunningham, (Fri Apr 27, 12:03 am)
Re: Back to the future., Pekka J Enberg, (Fri Apr 27, 12:24 am)
Re: Back to the future., Pekka Enberg, (Fri Apr 27, 12:51 am)
Re: Back to the future., Oliver Neukum, (Fri Apr 27, 2:50 am)
Re: Back to the future., Christoph Hellwig, (Fri Apr 27, 3:10 am)
Re: Back to the future., Pekka J Enberg, (Fri Apr 27, 3:12 am)
Re: Back to the future., Daniel Pittman, (Fri Apr 27, 3:21 am)
Re: Back to the future., Pavel Machek, (Fri Apr 27, 5:49 am)
Re: Back to the future., Pavel Machek, (Fri Apr 27, 7:55 am)
Re: Back to the future., Oliver Neukum, (Fri Apr 27, 12:07 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 1:44 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 2:24 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 2:26 pm)
Re: Back to the future., Nigel Cunningham, (Fri Apr 27, 2:39 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 2:44 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 3:04 pm)
Re: Back to the future., Nigel Cunningham, (Fri Apr 27, 3:07 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 3:08 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 3:12 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 3:26 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 3:41 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 4:01 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 4:17 pm)
Re: Back to the future., Nigel Cunningham, (Fri Apr 27, 4:19 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 4:21 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 4:45 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 4:50 pm)
Re: Back to the future., Nigel Cunningham, (Fri Apr 27, 4:57 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 4:59 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 5:02 pm)
Re: Back to the future., Jeremy Fitzhardinge, (Fri Apr 27, 5:18 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 5:18 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 5:40 pm)
Re: Back to the future., Paul Mackerras, (Fri Apr 27, 5:50 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 5:51 pm)
Re: Back to the future., David Lang, (Fri Apr 27, 5:54 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 6:00 pm)
Re: Back to the future., Matthew Garrett, (Fri Apr 27, 6:00 pm)
Re: Back to the future., Kyle Moffett, (Fri Apr 27, 6:03 pm)
Re: Back to the future., Jeremy Fitzhardinge, (Fri Apr 27, 6:05 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 6:08 pm)
Re: Back to the future., Linus Torvalds, (Fri Apr 27, 6:12 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 6:15 pm)
Re: Back to the future., Kyle Moffett, (Fri Apr 27, 6:25 pm)
Re: Back to the future., Rafael J. Wysocki, (Fri Apr 27, 6:44 pm)
Re: Back to the future., Daniel Hazelton, (Fri Apr 27, 7:51 pm)
Re: Back to the future., Oliver Neukum, (Fri Apr 27, 11:58 pm)
progress meter in s2disk (was Re: Back to the future.), Pavel Machek, (Sat Apr 28, 12:00 am)
Re: Back to the future., Pavel Machek, (Sat Apr 28, 1:50 am)
Re: Back to the future., Pekka J Enberg, (Sat Apr 28, 2:16 am)
Re: Back to the future., Pekka Enberg, (Sat Apr 28, 2:22 am)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 2:24 am)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 3:35 am)
Re: Back to the future., Oliver Neukum, (Sat Apr 28, 6:37 am)
Re: Back to the future., Linus Torvalds, (Sat Apr 28, 9:28 am)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 10:50 am)
Re: Back to the future., David Lang, (Sat Apr 28, 11:28 am)
Re: Back to the future., David Lang, (Sat Apr 28, 11:32 am)
Re: Back to the future., David Lang, (Sat Apr 28, 11:43 am)
Re: Back to the future., David Lang, (Sat Apr 28, 11:44 am)
Re: Back to the future., Bill Davidsen, (Sat Apr 28, 12:09 pm)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 12:14 pm)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 12:37 pm)
Re: Back to the future., Linus Torvalds, (Sat Apr 28, 2:25 pm)
Re: Back to the future., Rafael J. Wysocki, (Sat Apr 28, 4:03 pm)
Re: Back to the future., Linus Torvalds, (Sat Apr 28, 4:45 pm)
Re: Back to the future., Nigel Cunningham, (Sat Apr 28, 5:01 pm)
Re: Back to the future., Kyle Moffett, (Sat Apr 28, 8:43 pm)
Re: Back to the future., Pavel Machek, (Sun Apr 29, 1:23 am)
Re: Back to the future., Rafael J. Wysocki, (Sun Apr 29, 1:57 am)
Re: Back to the future., Pavel Machek, (Sun Apr 29, 1:59 am)
Re: Back to the future., Rafael J. Wysocki, (Sun Apr 29, 2:22 am)
Re: Back to the future., Rafael J. Wysocki, (Sun Apr 29, 2:32 am)
Re: Back to the future., Pavel Machek, (Thu May 3, 5:06 am)
Re: Back to the future., Pavel Machek, (Thu May 3, 8:10 am)
Re: Back to the future., Pavel Machek, (Thu May 3, 8:14 am)
Re: Back to the future., Pavel Machek, (Thu May 3, 8:25 am)
Re: Back to the future., Kyle Moffett, (Thu May 3, 9:53 am)
Re: Back to the future., Pavel Machek, (Thu May 3, 10:18 am)
Re: Back to the future., David Greaves, (Fri May 4, 12:52 am)
Re: Back to the future., Kyle Moffett, (Fri May 4, 6:27 am)
Re: Back to the future., Indan Zupancic, (Fri May 4, 2:52 pm)
Re: Back to the future., Pavel Machek, (Sat May 5, 2:16 am)
Re: Back to the future., Pavel Machek, (Sat May 5, 4:42 am)
Re: Back to the future., Indan Zupancic, (Sat May 5, 5:02 am)
Re: Back to the future., David Lang, (Sun May 6, 7:13 pm)
Re: Back to the future., Kyle Moffett, (Sun May 6, 8:33 pm)
Re: Back to the future., Pavel Machek, (Mon May 7, 5:48 am)
Re: Back to the future., Oliver Neukum, (Mon May 7, 5:52 am)
Re: Back to the future., david, (Mon May 7, 7:37 am)
Re: Back to the future., Pavel Machek, (Mon May 7, 12:51 pm)
Re: Back to the future., david, (Mon May 7, 12:55 pm)
Re: Back to the future., Pavel Machek, (Mon May 7, 1:38 pm)
Re: Back to the future., Disconnect, (Tue May 8, 10:36 am)
Re: Back to the future., Eric W. Biederman, (Fri Jun 1, 12:00 pm)