time and suspending sysdevs [was Re: Fixing MTRR smp breakage and suspending sysdevs.]

From: Pavel Machek
Date: Thu Oct 28 2004 - 17:50:55 EST


Hi!

> > >One thing I have noticed is that by adding the sysdev suspend/resume
> > >calls, I've gained a few seconds delay. I'll see if I can track down
> > the
> > >cause.

Sysdev suspend/resume calls should be added to swsusp1, too. Can
someone verify that this fixes stuff? I should get some sleep...

Pavel

--- clean/kernel/power/disk.c 2004-10-01 00:30:32.000000000 +0200
+++ linux/kernel/power/disk.c 2004-10-29 00:30:40.000000000 +0200
@@ -102,6 +116,7 @@

static void finish(void)
{
+ sysdev_resume();
device_resume();
platform_finish();
enable_nonboot_cpus();
@@ -133,8 +148,12 @@
free_some_memory();

disable_nonboot_cpus();
- if ((error = device_suspend(PM_SUSPEND_DISK)))
+ if ((error = device_suspend(PM_SUSPEND_DISK))) {
+ printk("Some devices failed to suspend\n");
goto Finish;
+ }
+
+ sysdev_suspend(POWER_SUSPEND_DISK);

return 0;
Finish:
--- clean/kernel/power/swsusp.c 2004-10-19 14:16:29.000000000 +0200
+++ linux/kernel/power/swsusp.c 2004-10-29 00:32:26.000000000 +0200
@@ -825,6 +812,7 @@
int swsusp_write(void)
{
int error;
+ sysdev_resume();
device_resume();
lock_swapdevices();
error = write_suspend_image();


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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/