Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765214AbXHDQmk (ORCPT ); Sat, 4 Aug 2007 12:42:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764126AbXHDQmc (ORCPT ); Sat, 4 Aug 2007 12:42:32 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:53382 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764146AbXHDQmb (ORCPT ); Sat, 4 Aug 2007 12:42:31 -0400 Date: Sat, 4 Aug 2007 09:41:19 -0700 From: Andrew Morton To: Linus Torvalds Cc: Ingo Molnar , Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, miklos@szeredi.hu, neilb@suse.de, dgc@sgi.com, tomoki.sekiyama.qu@hitachi.com, nikita@clusterfs.com, trond.myklebust@fys.uio.no, yingchao.zhou@gmail.com, richard@rsk.demon.co.uk Subject: Re: [PATCH 00/23] per device dirty throttling -v8 Message-Id: <20070804094119.81d8e533.akpm@linux-foundation.org> In-Reply-To: References: <20070803123712.987126000@chello.nl> <20070804063217.GA25069@elte.hu> <20070804070737.GA940@elte.hu> <20070804103347.GA1956@elte.hu> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2145 Lines: 55 On Sat, 4 Aug 2007 09:17:44 -0700 (PDT) Linus Torvalds wrote: > > > On Sat, 4 Aug 2007, Ingo Molnar wrote: > > > > [ my personal interest in this is the following regression: every time > > > i start a large kernel build with DEBUG_INFO on a quad-core 4GB RAM > > > box, i get up to 30 seconds complete pauses in Vim (and most other > > > tasks), during plain editing of the source code. (which happens when > > > Vim tries to write() to its swap/undo-file.) ] > > > > hm, it turns out that it's due to vim doing an occasional fsync not only > > on writeout, but during normal use too. "set nofsync" in the .vimrc > > solves this problem. > > Yes, that's independent. The fact is, ext3 *sucks* at fsync. I hate hate > hate it. It's totally unusable, imnsho. > > The whole point of fsync() is that it should sync only that one file, and > avoid syncing all the other stuff that is going on, and ext3 violates > that, because it ends up having to sync the whole log, or something like > that. So even if vim really wants to sync a small file, you end up waiting > for megabytes of data being written out. > > I detest logging filesystems. > Well it's not a problem with journalling per-se. Other journalling designs may well not have this problem. It's an unfortunate coupling: - the ext3 journal contains metadata from all altered files - ordered-mode needs to write back data for a file before committing its metdata to the journal. - fsync of one file requires a commit for its metadata, which will commit metadata for all files - hence we need to write back all data for all files which have metadata in the journal. It's pretty much unfixable given the ext3 journalling design, and the guarantees which data-ordered provides. The easy preventive is to mount with data=writeback. Maybe that should have been the default. - 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/