Re: Suspend-to-disk woes

From: Nigel Cunningham
Date: Mon Mar 21 2005 - 06:22:40 EST


Hi.

On Mon, 2005-03-21 at 18:38, Stefan Seyfried wrote:
> Nigel Cunningham wrote:
> > Hi.
> >
> > On Sun, 2005-03-20 at 08:29, Pavel Machek wrote:
>
> >> boot with "noresume", then mkswap.
> >
> > Yuck! Why panic when you know what is needed? A better solution is to
>
> Ok, so let's
>
> printk("You booted another kernel than you suspended with.\n");
> printk("You have two options now:\n");
> printk(" - boot the kernel you suspended with\n");
> printk(" - pass 'noresume' at boot and mkswap your swap partition "
> " later\n");
> printk("Try again, player 1!\n");
> panic();

Still in the yuck category, although the better information is
definitely an improvement :>

> > tell the user they've messed up and give them the option to (1) reboot
> > and try another kernel or (2) have swsusp restore the original swap
> > signature and continue booting. This is what suspend2 does (with a
> > timeout for the prompt). It's not that hard.
>
> yes, but you need user input etc. Not considered a good idea IIRC.

I understood that having it hang indefinitely was considered a bad idea.
Suspend2 already has code that does what I'm suggesting, and
incorporates a 30 second timeout.

> Anyway, the hard thing to do is to find out when to bail out and when
> not. The part that handles the user interface is the easier one :-)

Agreed. That's where Pavel's code might need a little hacking around.

Regards,

Nigel
--
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028; Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net

-
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/