From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Nigel Cunningham <ncunningham@linuxmail.org>
Cc: Pavel Machek <pavel@suse.cz>, Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 0/6] swsusp: Add support for swap files
Date: Fri, 22 Sep 2006 13:28:58 +0200 [thread overview]
Message-ID: <200609221328.58504.rjw@sisk.pl> (raw)
In-Reply-To: <20060922052324.GG2357@elf.ucw.cz>
On Friday, 22 September 2006 07:23, Pavel Machek wrote:
> On Fri 2006-09-22 11:01:53, Nigel Cunningham wrote:
> > Hi.
> >
> > On Wed, 2006-09-20 at 21:20 +0200, Rafael J. Wysocki wrote:
> > > Hi,
> > >
> > > The following series of patches makes swsusp support swap files.
> > >
> > > For now, it is only possible to suspend to a swap file using the in-kernel
> > > swsusp and the resume cannot be initiated from an initrd.
> >
> > I'm trying to understand 'resume cannot be initiated from an initrd'.
> > Does that mean if you want to use this functionality, you have to have
> > everything needed compiled in to the kernel, and it's not compatible
> > with LVM and so on?
>
> Not in this version of patch; for resume from initrd, ioctl()
> interface needs to be added (*).
Yup. This is not technically impossible, but the patches don't add an
interface needed for this purpose.
Initially I thought of a sysfs-based one, but it didn't seem to be a good
solution. I'm going to add an ioctl() to /dev/snapshot that will allow us
to set the "resume offset" from an application.
> Pavel
> (*) Actually.. of course resume from file from initrd is possible
> *now*, probably without this patch series, but that would be bmap and
> doing it by hand from userland.
Well, not from a swap file. To use a swap file for suspending we need a
kernel to tell us which page "slots" are available to us (otherwise we could
overwrite some swapped-out pages).
We could use a regular (non-swap) file like this but that would require us to
use some dangerous code (ie. one that writes directly to blocks belonging to
certain file bypassing the filesystem). IMHO this isn't worth it, provided
the kernel's swap-handling code can do this for us and is known to work. ;-)
Greetings,
Rafael
--
You never change things by fighting the existing reality.
R. Buckminster Fuller
next prev parent reply other threads:[~2006-09-22 11:26 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 19:20 [PATCH -mm 0/6] swsusp: Add support for swap files Rafael J. Wysocki
2006-09-20 19:31 ` [PATCH -mm 1/6] swsusp: Use device and offset to intentify swap areas Rafael J. Wysocki
2006-09-21 21:27 ` Pavel Machek
2006-09-20 19:34 ` [PATCH -mm 2/6] swsusp: Rearrange swap-handling code Rafael J. Wysocki
2006-09-21 21:28 ` Pavel Machek
2006-09-20 19:41 ` [PATCH -mm 3/6] swsusp: Use block device offsets to identify swap locations Rafael J. Wysocki
2006-09-21 21:30 ` Pavel Machek
2006-09-21 22:21 ` Rafael J. Wysocki
2006-09-20 19:46 ` [PATCH -mm 4/6] swsusp: Add resume_offset command line parameter Rafael J. Wysocki
2006-09-21 21:31 ` Pavel Machek
2006-09-21 22:18 ` Rafael J. Wysocki
2006-09-22 13:34 ` Pavel Machek
2006-09-20 19:54 ` [PATCH -mm 5/6] mm: Print first block offset for swap areas Rafael J. Wysocki
2006-09-21 21:32 ` Pavel Machek
2006-09-21 22:10 ` Dave Jones
2006-09-21 22:46 ` Rafael J. Wysocki
2006-09-21 23:58 ` Jason Lunz
2006-09-22 10:57 ` Rafael J. Wysocki
2006-09-22 14:13 ` Jason Lunz
2006-09-22 14:18 ` Pavel Machek
2006-09-22 14:35 ` Jason Lunz
2006-09-22 14:37 ` Pavel Machek
2006-09-22 14:32 ` Rafael J. Wysocki
2006-09-22 14:33 ` Pavel Machek
2006-09-20 20:01 ` [PATCH -mm 6/6] swsusp: Document support for swap files Rafael J. Wysocki
2006-09-21 21:33 ` Pavel Machek
2006-09-22 1:01 ` [PATCH -mm 0/6] swsusp: Add " Nigel Cunningham
2006-09-22 5:23 ` Pavel Machek
2006-09-22 11:28 ` Rafael J. Wysocki [this message]
2006-09-22 22:18 ` Nigel Cunningham
2006-09-23 22:18 ` Rafael J. Wysocki
2006-09-23 22:49 ` Nigel Cunningham
2006-09-23 22:59 ` Pavel Machek
2006-09-23 23:24 ` Nigel Cunningham
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=200609221328.58504.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
--cc=pavel@suse.cz \
/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