public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove process freezer from suspend to RAM pathway
@ 2007-07-03  4:29 Matthew Garrett
  2007-07-03  5:49 ` [linux-pm] " Benjamin Herrenschmidt
  2007-07-03 16:03 ` Alan Stern
  0 siblings, 2 replies; 62+ messages in thread
From: Matthew Garrett @ 2007-07-03  4:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-pm

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@srcf.ucam.org>

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@srcf.ucam.org

^ permalink raw reply related	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2007-07-12 19:49 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fa.ftLWBLCc+XqdYjiuxoPg+qyuUOE@ifi.uio.no>
     [not found] ` <fa.Oxrm8HYXTOF4jv5LrTjEe16lCE0@ifi.uio.no>
     [not found]   ` <fa.d3GOse+YbAb42uYwLymWkJiH9Fw@ifi.uio.no>
2007-07-04  0:17     ` [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway Robert Hancock
2007-07-04  0:34       ` Matthew Garrett
2007-07-04 10:21         ` Rafael J. Wysocki
2007-07-03  4:29 Matthew Garrett
2007-07-03  5:49 ` [linux-pm] " Benjamin Herrenschmidt
2007-07-03 13:07   ` Rafael J. Wysocki
2007-07-03 16:03 ` Alan Stern
2007-07-03 16:05   ` Matthew Garrett
2007-07-03 16:57     ` Alan Stern
2007-07-03 17:02       ` Matthew Garrett
2007-07-03 19:33         ` Alan Stern
2007-07-03 19:42           ` Matthew Garrett
2007-07-03 19:54             ` Alan Stern
2007-07-03 20:23               ` Matthew Garrett
2007-07-03 21:10                 ` Alan Stern
2007-07-03 21:12                   ` Matthew Garrett
2007-07-03 21:16                     ` Alan Stern
2007-07-03 21:20                       ` Matthew Garrett
2007-07-03 21:37                         ` Rafael J. Wysocki
2007-07-03 21:36                           ` Matthew Garrett
2007-07-03 21:47                             ` Oliver Neukum
2007-07-03 22:46                             ` Rafael J. Wysocki
2007-07-04  3:38                           ` Paul Mackerras
2007-07-04 10:42                             ` Rafael J. Wysocki
2007-07-04 10:58                               ` Paul Mackerras
2007-07-04 11:25                                 ` Rafael J. Wysocki
2007-07-04 11:34                                   ` Paul Mackerras
2007-07-04 14:12                                     ` Dmitry Torokhov
2007-07-04 15:38                                     ` Alan Stern
2007-07-04 19:07                                       ` Alan Stern
2007-07-04 11:51                                   ` Miklos Szeredi
2007-07-04 14:41                                     ` Rafael J. Wysocki
2007-07-04 14:45                                       ` Miklos Szeredi
2007-07-04 15:03                                         ` Oliver Neukum
2007-07-04 15:17                                           ` Rafael J. Wysocki
2007-07-05  0:29                                             ` Paul Mackerras
2007-07-05 12:29                                               ` Rafael J. Wysocki
2007-07-12 15:13                                               ` Pavel Machek
2007-07-04 15:42                                     ` Alan Stern
2007-07-04 19:25                                       ` Miklos Szeredi
2007-07-04 21:36                                         ` Rafael J. Wysocki
2007-07-05  8:37                                           ` Miklos Szeredi
2007-07-05 12:39                                             ` Rafael J. Wysocki
2007-07-05 12:39                                               ` Miklos Szeredi
2007-07-05 16:10                                                 ` Jeremy Fitzhardinge
2007-07-05 17:45                                                   ` Miklos Szeredi
2007-07-05  0:43                                         ` Paul Mackerras
2007-07-05 12:49                                           ` Rafael J. Wysocki
2007-07-05  0:36                                       ` Paul Mackerras
2007-07-05 12:51                                         ` Rafael J. Wysocki
2007-07-05 12:50                                           ` Johannes Berg
2007-07-05 13:47                                             ` Rafael J. Wysocki
2007-07-05 14:25                                         ` Alan Stern
2007-07-05 17:42                                           ` Miklos Szeredi
2007-07-05 20:43                                             ` Alan Stern
2007-07-04 12:41                                   ` Theodore Tso
2007-07-04 14:40                                     ` Rafael J. Wysocki
2007-07-03 22:21                         ` Alan Stern
2007-07-03 22:42                           ` Matthew Garrett
2007-07-04 14:38                             ` Alan Stern
2007-07-04 14:58                               ` Matthew Garrett
2007-07-04 15:02                                 ` Oliver Neukum
2007-07-04 15:57                                 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox