lkml.org 
[lkml]   [2004]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SOFTWARE_SUSPEND as a module
Hi.

On Fri, 23 Apr 2004 19:38:36 +1000, Herbert Xu
<herbert@gondor.apana.org.au> wrote:
> What I've done is:
>
> * Split swsusp.c into swsusp-core.c and the rest based on whether it
> is called by do_magic() or not.
> * Added EXPORTs for the symbols needed by what's left of swsusp.
> * Added module parameter parsing.

Do you really need to make suspend a module to achieve this? I'll freely
admit it might be nice to save a little bit of memory by modularising it,
and it might save Pavel and I a reboot or two while developing, but for
what you're after, couldn't you just move the call that starts resuming?

> As a side-effect it also allows you to resume from devices that couldn't
> be done before due to the need for user-space setup. Examples are LVM
> and NBD.

LVM can be compiled in, can't it? Does it need to do some setup from an
initrd?

>> prepared for it in userland? In such case you need to add
>> freeze_processes() to resume path.
>
> Is that really necessary if the user-space caller ensures that all
> disk accesses are shut down? After all the loading for resume will
> occur in the initrd before any disk activity has occured.

So long as the initrd doesn't mount any filesystems that were suspended,
you should be okay, IIRC.

Nigel
--
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614, Australia.
+61 (2) 6251 7727 (wk)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:1.497 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site