mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] Remove process freezer from suspend to RAM pathway
@ 2007-07-03 19:32 Oliver Neukum
  2007-07-03 20:02 ` [linux-pm] " Alan Stern
  0 siblings, 1 reply; 145+ messages in thread
From: Oliver Neukum @ 2007-07-03 19:32 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: rjw, benh, mjg59, linux-kernel, linux-pm, pavel, nigel

Am Dienstag, 3. Juli 2007 schrieb Miklos Szeredi:
> > And a further question. The freezer is not atomic. What do you do
> > if a task not yet frozen calls sys_sync(), but fuse is already frozen?
> 
> What do you do if a task not yet frozen writes to a pipe, on the other
> end of which is a task already frozen?

The same as you do with a pipe when the reader is not ready.

> It doesn't matter.  The only thing that should matter during suspend
> (not hibernate) is saving the state of devices to ram, and putting the
> devices to sleep.

Well, but you did remove sys_sync() from the freezer, which is
and must be called in the hibernate path.
 
> I'm not sure why this can't be made atomic, but assuming, that it
> can't, fuse should still not need to be implicated.  If it is, that's
> an indication about something wrong in the suspend procedure.

Nope, something's wrong in fuse. You must be able to deal with sync
until every task is frozen.

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 145+ messages in thread
* [PATCH] Remove process freezer from suspend to RAM pathway
@ 2007-07-03  4:29 Matthew Garrett
  2007-07-03  4:54 ` Nigel Cunningham
  2007-07-03  6:08 ` Nigel Cunningham
  0 siblings, 2 replies; 145+ 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	[flat|nested] 145+ messages in thread

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

Thread overview: 145+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8CIbE-3y1-1@gated-at.bofh.it>
     [not found] ` <8CJKt-62G-35@gated-at.bofh.it>
     [not found]   ` <8CKZS-7Ur-3@gated-at.bofh.it>
     [not found]     ` <8CLjc-8iq-29@gated-at.bofh.it>
     [not found]       ` <8CO7m-4k4-11@gated-at.bofh.it>
2007-07-03 12:03         ` [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway Bodo Eggert
2007-07-03 19:32 Oliver Neukum
2007-07-03 20:02 ` [linux-pm] " Alan Stern
2007-07-03 20:19   ` Miklos Szeredi
2007-07-03 21:20     ` Rafael J. Wysocki
2007-07-03 20:45   ` Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2007-07-03  4:29 Matthew Garrett
2007-07-03  4:54 ` Nigel Cunningham
2007-07-03  5:48   ` Benjamin Herrenschmidt
2007-07-05  0:03     ` Pavel Machek
2007-07-05  0:46       ` [linux-pm] " Paul Mackerras
2007-07-03  6:08 ` Nigel Cunningham
2007-07-03  7:19   ` Benjamin Herrenschmidt
2007-07-03  7:44     ` [linux-pm] " Oliver Neukum
2007-07-03 10:47       ` Miklos Szeredi
2007-07-03 11:07         ` Oliver Neukum
2007-07-03 11:22           ` Miklos Szeredi
2007-07-03 11:27             ` Oliver Neukum
2007-07-03 11:45               ` Benjamin Herrenschmidt
2007-07-03 11:50                 ` Oliver Neukum
2007-07-05  0:02             ` Pavel Machek
2007-07-03 11:44           ` Benjamin Herrenschmidt
2007-07-03 11:55             ` Oliver Neukum
2007-07-03 23:40               ` Paul Mackerras
2007-07-04  7:02                 ` Miklos Szeredi
2007-07-04  8:02                   ` Paul Mackerras
2007-07-04  8:26                     ` Miklos Szeredi
2007-07-04 10:26                       ` Rafael J. Wysocki
2007-07-03 12:58           ` Rafael J. Wysocki
2007-07-03 15:46           ` Miklos Szeredi
2007-07-03 11:23       ` Paul Mackerras
2007-07-03 11:42         ` Oliver Neukum
2007-07-03 23:11           ` Paul Mackerras
2007-07-04  8:11             ` Oliver Neukum
2007-07-04  8:27               ` Paul Mackerras
2007-07-04  8:39                 ` Oliver Neukum
2007-07-04  9:21                   ` Paul Mackerras
2007-07-04 10:08                     ` Oliver Neukum
2007-07-04 10:46                       ` Paul Mackerras
2007-07-04 10:53                         ` Oliver Neukum
2007-07-04 10:59                           ` Paul Mackerras
2007-07-04 11:02                             ` Oliver Neukum
2007-07-04 14:44             ` Alan Stern
2007-07-03 15:58         ` Alan Stern
2007-07-04  4:02           ` Paul Mackerras
2007-07-04 15:04             ` Alan Stern
2007-07-05  0:28               ` Paul Mackerras
2007-07-03 11:40       ` Benjamin Herrenschmidt
2007-07-03 11:46         ` Oliver Neukum
2007-07-03 13:07           ` Rafael J. Wysocki
2007-07-03 12:56     ` Rafael J. Wysocki
2007-07-03 14:21       ` [linux-pm] " Johannes Berg
2007-07-03 14:50         ` Alan Stern
2007-07-03 14:59           ` Johannes Berg
2007-07-03 15:22             ` Rafael J. Wysocki
2007-07-03 17:38               ` Miklos Szeredi
2007-07-03 20:54                 ` Rafael J. Wysocki
2007-07-03 20:21             ` Alan Stern
2007-07-04  4:59               ` Paul Mackerras
2007-07-04 14:57                 ` Alan Stern
2007-07-05  0:23                   ` Paul Mackerras
2007-07-05  6:58                     ` Oliver Neukum
2007-07-05  8:17                       ` Miklos Szeredi
2007-07-05  8:24                         ` Oliver Neukum
2007-07-05  8:41                           ` Miklos Szeredi
2007-07-05  8:48                             ` Oliver Neukum
2007-07-05  8:58                               ` Miklos Szeredi
2007-07-05 10:02                                 ` Oliver Neukum
2007-07-05 10:14                                   ` Miklos Szeredi
2007-07-05 11:40                                     ` Rafael J. Wysocki
2007-07-05 11:54                                       ` Miklos Szeredi
2007-07-05 13:23                                         ` Rafael J. Wysocki
2007-07-05 13:28                                           ` Oliver Neukum
2007-07-05 13:46                                             ` Matthew Garrett
2007-07-05 14:09                                               ` Rafael J. Wysocki
2007-07-05 14:23                                                 ` Matthew Garrett
2007-07-05 14:46                                                   ` Ray Lee
2007-07-05 15:00                                                     ` Matthew Garrett
2007-07-05 14:59                                                   ` Rafael J. Wysocki
2007-07-05 16:06                                                   ` Jeremy Maitin-Shepard
2007-07-06  5:45                                                   ` Daniel Pittman
2007-07-05 14:02                                             ` Rafael J. Wysocki
2007-07-05 22:38                               ` Benjamin Herrenschmidt
2007-07-06  7:04                                 ` Rafael J. Wysocki
2007-07-06  7:30                                 ` Oliver Neukum
2007-07-06 12:35                                   ` Benny Amorsen
2007-07-06 12:45                                     ` Oliver Neukum
2007-07-05  9:18                         ` Pavel Machek
2007-07-05  9:31                           ` Miklos Szeredi
2007-07-05 11:54                             ` Pavel Machek
2007-07-05 12:07                               ` Miklos Szeredi
2007-07-05 13:28                                 ` Rafael J. Wysocki
2007-07-05 19:38                                 ` Oliver Neukum
2007-07-05 19:44                                   ` Miklos Szeredi
2007-07-05 20:19                                     ` Rafael J. Wysocki
2007-07-05 20:38                                       ` Miklos Szeredi
2007-07-05 21:01                                         ` Rafael J. Wysocki
2007-07-05 20:34                                     ` Oliver Neukum
2007-07-05 20:46                                       ` Miklos Szeredi
2007-07-05 20:49                                         ` Oliver Neukum
2007-07-05 20:53                                           ` Oliver Neukum
2007-07-05 21:06                                           ` Alan Stern
2007-07-05 21:15                                             ` Oliver Neukum
2007-07-05 21:31                                               ` Miklos Szeredi
2007-07-05 21:07                                           ` Miklos Szeredi
2007-07-05 21:15                                             ` Alan Stern
2007-07-05 21:26                                               ` Miklos Szeredi
2007-07-05 21:37                                               ` Oliver Neukum
2007-07-06  7:13                                                 ` Rafael J. Wysocki
2007-07-06  8:59                                                   ` Benjamin Herrenschmidt
2007-07-06  9:31                                                     ` Oliver Neukum
2007-07-06  9:53                                                       ` Rafael J. Wysocki
2007-07-07  2:46                                                         ` Benjamin Herrenschmidt
2007-07-07  2:44                                                       ` Benjamin Herrenschmidt
2007-07-07 20:48                                                         ` Rafael J. Wysocki
2007-07-08  0:50                                                           ` Benjamin Herrenschmidt
2007-07-05 23:05                                     ` Benjamin Herrenschmidt
2007-07-06  3:59                                       ` Jeremy Maitin-Shepard
2007-07-06  7:32                                       ` Oliver Neukum
2007-07-07 12:17                                 ` Pavel Machek
2007-07-07 20:42                                   ` Miklos Szeredi
2007-07-05 11:58                             ` Rafael J. Wysocki
2007-07-05 12:24                               ` Miklos Szeredi
2007-07-05 13:31                                 ` Rafael J. Wysocki
2007-07-05 13:50                                   ` Miklos Szeredi
2007-07-05 14:14                                     ` Rafael J. Wysocki
2007-07-05 14:14                                       ` Miklos Szeredi
2007-07-05 22:04                             ` Pavel Machek
2007-07-06  7:07                               ` Miklos Szeredi
2007-07-07 12:19                                 ` Pavel Machek
2007-07-06  7:16                               ` Rafael J. Wysocki
2007-07-05 14:23                     ` Alan Stern
2007-07-05 22:59                       ` Benjamin Herrenschmidt
2007-07-06  7:20                         ` Rafael J. Wysocki
2007-07-06 15:13                         ` Alan Stern
2007-07-08  7:19                           ` Paul Mackerras
2007-07-07  7:56                         ` Pavel Machek
2007-07-04  3:55           ` Paul Mackerras
2007-07-04 15:12             ` Alan Stern
2007-07-05  0:35               ` Paul Mackerras
2007-07-05 14:42                 ` Alan Stern
2007-07-03 14:51         ` Rafael J. Wysocki
2007-07-03 14:48           ` Johannes Berg
2007-07-03 21:14       ` Benjamin Herrenschmidt
2007-07-03 21:32         ` Rafael J. Wysocki
2007-07-04  3:29           ` [linux-pm] " Paul Mackerras
2007-07-04 10:33             ` Rafael J. Wysocki
2007-07-04 10:48               ` Paul Mackerras
2007-07-04 11:10                 ` Rafael J. Wysocki
2007-07-04 11:24                   ` Paul Mackerras
2007-07-04 14:30                     ` Rafael J. Wysocki
2007-07-05  0:15                       ` Paul Mackerras
2007-07-05 11:54                         ` Rafael J. Wysocki
2007-07-07 12:09                         ` Pavel Machek
2007-07-04 11:25                   ` Paul Mackerras

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

all inboxes | Powered by JetHome®