[PATCH] Remove process freezer from suspend to RAM pathway
- From: Matthew Garrett <mjg59@xxxxxxxxxxxxx>
- Date: Tue, 3 Jul 2007 05:29:18 +0100
Suspend to RAM on a machine with / on a fuse filesystem turns out to be
a screaming nightmare - either the suspend fails because syslog (for
instance) can't be frozen, or the machine deadlocks for some other
reason I haven't tracked down. We could "fix" fuse, or alternatively we
could do what we do for suspend to RAM on other platforms (PPC and APM)
and just not use the freezer.
Signed-off-by: Matthew Garrett <mjg59@xxxxxxxxxxxxx>
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 8812985..5f109d5 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -19,7 +19,6 @@
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/resume-trace.h>
-#include <linux/freezer.h>
#include <linux/vmstat.h>
#include "power.h"
@@ -81,11 +80,6 @@ static int suspend_prepare(suspend_state_t state)
pm_prepare_console();
- if (freeze_processes()) {
- error = -EAGAIN;
- goto Thaw;
- }
-
if ((free_pages = global_page_state(NR_FREE_PAGES))
< FREE_PAGE_NUMBER) {
pr_debug("PM: free some memory\n");
@@ -93,7 +87,7 @@ static int suspend_prepare(suspend_state_t state)
if (nr_free_pages() < FREE_PAGE_NUMBER) {
error = -ENOMEM;
printk(KERN_ERR "PM: No enough memory\n");
- goto Thaw;
+ goto Restore_console;
}
}
@@ -118,8 +112,7 @@ static int suspend_prepare(suspend_state_t state)
device_resume();
Resume_console:
resume_console();
- Thaw:
- thaw_processes();
+ Restore_console:
pm_restore_console();
return error;
}
@@ -170,7 +163,6 @@ static void suspend_finish(suspend_state_t state)
pm_finish(state);
device_resume();
resume_console();
- thaw_processes();
pm_restore_console();
}
--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
-
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/
- Follow-Ups:
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Pavel Machek
- Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway
- From: Alan Stern
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Rafael J. Wysocki
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Romano Giannetti
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Oliver Neukum
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Benjamin Herrenschmidt
- Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway
- From: Benjamin Herrenschmidt
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- From: Nigel Cunningham
- Re: [PATCH] Remove process freezer from suspend to RAM pathway
- Prev by Date: [PATCH for 2.6.22] ACPI: fix acpi_osi=!Linux
- Next by Date: Re: [PATCH 02/12] handle multiple network paths to AoE device
- Previous by thread: [PATCH for 2.6.22] ACPI: fix acpi_osi=!Linux
- Next by thread: Re: [PATCH] Remove process freezer from suspend to RAM pathway
- Index(es):
Relevant Pages
|