Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966675AbWKTUoh (ORCPT ); Mon, 20 Nov 2006 15:44:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S966676AbWKTUoh (ORCPT ); Mon, 20 Nov 2006 15:44:37 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:63941 "EHLO ogre.sisk.pl") by vger.kernel.org with ESMTP id S966675AbWKTUog (ORCPT ); Mon, 20 Nov 2006 15:44:36 -0500 From: "Rafael J. Wysocki" To: nigel@suspend2.net Subject: Re: [PATCH -mm 0/2] Use freezeable workqueues to avoid suspend-related XFS corruptions Date: Mon, 20 Nov 2006 21:40:46 +0100 User-Agent: KMail/1.9.1 Cc: David Chinner , Andrew Morton , LKML , Pavel Machek References: <200611160912.51226.rjw@sisk.pl> <20061120001540.GX11034@melbourne.sgi.com> <1164020537.10428.11.camel@nigel.suspend2.net> In-Reply-To: <1164020537.10428.11.camel@nigel.suspend2.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611202140.47322.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1884 Lines: 61 Hi, On Monday, 20 November 2006 12:02, Nigel Cunningham wrote: > Hi all. > > I've did some testing this afternoon with bdev freezing disabled and > without any non-vanilla code to freeze kthreads (Rafael's or my older > version). Thanks for testing this. > If I put a BUG_ON() in submit_bio for non suspend2 I/O, it catches this > trace: > > submit_bio > xfs_buf_iorequest > xlog_bdstrat_cb > xlog_state_release_iclog > xlog_state_sync_all > xfs_log_force > xfs_syncsub > xfs_sync > vfs_sync > vfs_sync_worker > xfssyncd > keventd_create_kthread Well, this trace apparently comes from xfssyncd wich explicitly calls try_to_freeze(). When does this happen? > I haven't yet reproduced anything on another code path (eg pdflush). > > So, it would appear that freezing kthreads without freezing bdevs should > be a possible solution. It may however leave some I/O unsynced > pre-resume and therefore result in possible dataloss if no resume > occurs. I therefore wonder whether it's better to stick with bdev > freezing It looks like xfs is the only filesystem that really implements bdev freezing, so for other filesystems it's irrelevant. However, it may affect the dm, and I'm not sure what happens if someone tries to use a swap file on a dm device for the suspend _after_ we have frozen bdevs. > or create some variant wherein XFS is taught to fully flush > pending writes and not create new I/O. I think we should prevent filesystems from submitting any new I/O after processes have been frozen, this way or another. Greetings, Rafael -- You never change things by fighting the existing reality. R. Buckminster Fuller - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/