Re: [swsusp fixes] Re: Linux 2.4.19pre5-ac3

Pavel Machek (pavel@suse.cz)
Tue, 9 Apr 2002 12:54:40 +0200


Hi!

> > > > +
> > > > +You have two ways to use this code. The first one is if you've compiled in
> > > > +sysrq support then you may press Sysrq-D to request suspend. The other way
> > > > +is with a patched SysVinit (my patch is against 2.76 and available at my
> > > > +home page). You might call 'swsusp' or 'shutdown -z <time>'.
> > > > +
> > > > +Either way it saves the state of the machine into active swaps and then
> > > > +reboots. By the next booting the kernel's resuming function is either triggered
> > > > +by swapon -a (which is ought to be in the very early stage of booting) or you
> > > > +may explicitly specify the swap partition/file to resume from with ``resume=''
> > > > +kernel option. If signature is found it loads and restores saved state. If the
> > >
> > > Does it have to be an "active swap partition"? What about systems
> > > without active swap, but space enough for a partition?
> >
> > There you just make it partition and then mkswap/swapon it. Or did I
> > misunderstand the question?
> > Pavel
> Pavel,
>
> maybe I was unclear. For reasons of interactivity, I do not have any
> swap enabled on my Notebook. The 320 MB are enough for my workload and I
> am willing to accept the OOM Killer when I do really stupid things. If I
> enable swap the (all of them to some degree :-) VM decides to swap out
> "unused" processes. Most of them are desktop related and if I need them
> the system responds sluggish. Therefore - no swap activated.
>
> My question was: can I have a system without active swap and still use
> swsusp? Creating a swap/suspend partition of appropriate size is not a
> problem. I just do not want to "swapon" it.

You need to swapon it. If you do not want to keep it swapped on,
there's no problem in

swapon /dev/swap
echo 4 > /proc/acpi/sleep
sleep 10
swapoff /dev/swap

Pavel

-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
-
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/