mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: John Richard Moser <nigelenki@comcast.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Suspend to disk:  do we HAVE to use swap?
Date: Tue, 31 Oct 2006 07:39:11 +0100	[thread overview]
Message-ID: <200610310739.11500.rjw@sisk.pl> (raw)
In-Reply-To: <4546EDD4.70904@comcast.net>

On Tuesday, 31 October 2006 07:31, John Richard Moser wrote:
> 
> Rafael J. Wysocki wrote:
> > On Tuesday, 31 October 2006 04:42, John Richard Moser wrote:
> >> Something dumb came into my head, and the question is thus brought up
> >> here:  Do we HAVE to use swap for suspend to disk? How about the file
> >> system?
> >
> > In short, we could use regular files for the suspend in the same way in which we
> > use them for swap.  Namely, we could bmap() a file and create a map of it
> > (eg. with extents) that would be used for accessing the corresponding disk
> > sectors at the block device level.  Then, to be able to read the image the
> > resume code would have to be provided with the number of the sector in which
> > the suspend image header is located.
> >
> > However, we already have code that allows us to use swap files for the suspend
> > and turning a regular file into a swap file is as easy as running 'mkswap' and
> > 'swapon' on it.
> 
> And the kernel can survive being loaded, mounting a file system
> readonly, activating swapon on the swap file on the read-only file
> system, and then resuming from it?

The swap file is not activated during the resume before the suspend image
is read from it.  That's why we need the number of the sector in which the
suspend image header is located.

> Also, the file system is consistent after a suspend to disk?

Yes, it is.

> I believe I mentioned something about compressing the image as well...

If you need to compress the image during the suspend, please visit
eg. http://suspend.sf.net (it is recommended to use the latest CVS).

Greetings,
Rafael


-- 
You never change things by fighting the existing reality.
		R. Buckminster Fuller

  reply	other threads:[~2006-10-31  6:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31  3:42 John Richard Moser
2006-10-31  6:16 ` Rafael J. Wysocki
2006-10-31  6:31   ` John Richard Moser
2006-10-31  6:39     ` Rafael J. Wysocki [this message]
2006-10-31 13:48   ` Alistair John Strachan
2006-10-31 17:40     ` Luca Tettamanti
2006-10-31 19:05       ` Alistair John Strachan
2006-10-31 19:19         ` Rafael J. Wysocki
2006-10-31 19:41           ` John Richard Moser
2006-10-31 20:04             ` Luca Tettamanti
2006-10-31 20:15               ` John Richard Moser
2006-10-31 21:20                 ` Rafael J. Wysocki
2006-10-31 20:15           ` Luca Tettamanti
2006-10-31 21:18             ` Rafael J. Wysocki
2006-10-31 22:51               ` Luca Tettamanti
2006-10-31 22:31 ` Michael Lothian

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=200610310739.11500.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigelenki@comcast.net \
    /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®