From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760227AbXGCPCW (ORCPT ); Tue, 3 Jul 2007 11:02:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755342AbXGCPCN (ORCPT ); Tue, 3 Jul 2007 11:02:13 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:45076 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755215AbXGCPCN (ORCPT ); Tue, 3 Jul 2007 11:02:13 -0400 From: "Rafael J. Wysocki" To: Benjamin Herrenschmidt Subject: Re: [PATCH] Remove process freezer from suspend to RAM pathway Date: Tue, 3 Jul 2007 17:09:29 +0200 User-Agent: KMail/1.9.5 Cc: Matthew Garrett , linux-kernel@vger.kernel.org, linux-pm@lists.linux-foundation.org, Pavel Machek , Nigel Cunningham References: <20070703042916.GA17240@srcf.ucam.org> <1183441887.10386.77.camel@localhost.localdomain> <200707031508.45595.rjw@sisk.pl> In-Reply-To: <200707031508.45595.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707031709.29968.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, 3 July 2007 15:08, Rafael J. Wysocki wrote: > On Tuesday, 3 July 2007 07:51, Benjamin Herrenschmidt wrote: > > On Tue, 2007-07-03 at 05:29 +0100, Matthew Garrett wrote: > > > 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. > > > > The main reason for deadlocks is because we do a sys_sync() after the > > freeze, which we shouldn't do. > > So why don't we remove the sys_sync() from freeze_processes() instead? The patch follows (untested). Greetings, Rafael --- From: Rafael J. Wysocki We shouldn't sync filesystems from within the freezer, because it's not needed for suspend to RAM and leads to problems with FUSE. Signed-off-by: Rafael J. Wysocki --- kernel/power/disk.c | 4 ++++ kernel/power/process.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) Index: linux-2.6.22-rc7/kernel/power/disk.c =================================================================== --- linux-2.6.22-rc7.orig/kernel/power/disk.c +++ linux-2.6.22-rc7/kernel/power/disk.c @@ -296,6 +296,10 @@ int hibernate(void) { int error; + printk("Syncing filesystems ... \n"); + sys_sync(); + printk("done.\n"); + mutex_lock(&pm_mutex); /* The snapshot device should not be opened while we're running */ if (!atomic_add_unless(&snapshot_device_available, -1, 0)) { Index: linux-2.6.22-rc7/kernel/power/process.c =================================================================== --- linux-2.6.22-rc7.orig/kernel/power/process.c +++ linux-2.6.22-rc7/kernel/power/process.c @@ -190,7 +190,6 @@ int freeze_processes(void) if (error) return error; - sys_sync(); error = try_to_freeze_tasks(FREEZER_KERNEL_THREADS); if (error) return error;