Re: Which is simpler? (Was Re: [Suspend2-devel] Re: [ 00/10] [Suspend2] Modules support.)

From: Rafael J. Wysocki
Date: Thu Feb 09 2006 - 08:19:38 EST


Hi,

On Thursday 09 February 2006 10:25, Pavel Machek wrote:
> Good morning ;-).
>
> > > At one point you said you'd like to work with us, and earlier in the
> > > threads you stated that porting suspend2 to userland should be easy.
> > >
> > > [I do not think that putting suspend2 into git is useful thing to
> > > do. Of course, it is your option; but it seems to me that people
> > > likely to use suspend2 are not the kind of people that use git.]
> > >
> > > It would be very helpful if you could install uswsusp, then try to
> > > make suspend2 run in userland on top of uswsusp interface. Not
> > > everything will be possible that way, but it most of features should
> > > be doable that way. I'd hate to code yet another splashscreen code,
> > > for example...
> >
> > I've begun briefly to have a look at this.
> >
> > Part of the problem I have, both with doing incremental patches for swsusp
> > and with doing a userspace version, is that some of the fundamentals are
> > redesigned in suspend2. The most important of these is that we store the
> > metadata in bitmaps (for pageflags) and extents (for storage) instead of
> > pbes. Do you have thoughts on how to overcome that issue? Are you
> > willing, for example, to do work on switching swsusp to use a different
> > method of storing its data?
>
> Any changes to userspace are a fair game. OTOH kernel provides linear
> image to be saved to userspace, and what it uses internally should not
> be important to userland parts. (And Rafael did some changes in that
> area to make it more effective, IIRC).

Yes. The code is now split into the part that handles the snapshot image
(in snapshot.c) and the part that writes/reads it to swap (in swap.c). [I'm
referring to recent -mm kernels.]

The access to the snapshot image is provided via the functions
snapshot_write_next() and snapshot_read_next() that are called by the
code in swap.c and may be used by the user space tools via the
interface in user.c. In principle it ought to be possible to plug
something else instead of the code in snapshot.c without
breaking the rest.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/