Messages in this thread | | | From | Nigel Cunningham <> | Subject | Re: [Suspend2][ 0/9] Extents support. | Date | Tue, 27 Jun 2006 18:58:17 +1000 |
| |
Hi.
On Tuesday 27 June 2006 18:12, Greg KH wrote: > On Tue, Jun 27, 2006 at 09:59:06AM +0200, Jens Axboe wrote: > > Now I haven't followed the suspend2 vs swsusp debate very closely, but > > it seems to me that your biggest problem with getting this merged is > > getting consensus on where exactly this is going. Nobody wants two > > different suspend modules in the kernel. So there are two options - > > suspend2 is deemed the way to go, and it gets merged and replaces > > swsusp. Or the other way around - people like swsusp more, and you are > > doomed to maintain suspend2 outside the tree. > > Actually, there's a third option that is looking like the way forward, > doing all of this from userspace and having no suspend-to-disk in the > kernel tree at all. > > Pavel and others have a working implementation and are slowly moving > toward adding all of the "bright and shiny" features that is in suspend2 > to it (encryption, progress screens, abort by pressing a key, etc.) so > that there is no loss of functionality. > > So I don't really see the future of suspend2 because of this...
But what Rafael and Pavel are doing is really only moving the highest level of controlling logic to userspace (ok, and maybe compression and encryption too). Everything important (freezing other processes, atomic copy and the guts of the I/O) is still done by the kernel.
And there _is_ loss of functionality - uswsusp still doesn't support writing a full image of memory, writing to multiple swap devices (partitions or files), or writing to ordinary files. They're getting the low hanging fruit, but when it comes to these parts of the problem, they're going to require either smoke and very good mirrors (eg the swap prefetching trick), or simply refuse to implement them.
If we take the problem one step further, and begin to think about checkpointing, they're in even bigger trouble. I'll freely admit that I'd have to redesign the way I store data so that random parts of the image could be replaced, have hooks in mm to be able to learn what pages need have changed and would also need filesystem support to handle that part of the problem, but I'd at least be working in the right domain.
I don't want to demean Rafael and Pavels' work for a moment. I've benefited from Pavel's help of Gabor in the beginning, and a little bit since he forked and merged in 2.5. But it seems to me that uswsusp is a short trip down a dead end road. It just doesn't have a future beyond being an interesting hack that proves you can safely run a program in userspace while snapshotting. Suspending to disk belongs in the kernel. That is shown clearly by the fact that uswsusp continues to use kernel code to do the really critical tasks, rather than being some super privileged userspace program that does them itself from userspace.
Regards,
Nigel -- See http://www.suspend2.net for Howtos, FAQs, mailing lists, wiki and bugzilla info. [unhandled content-type:application/pgp-signature] | |