Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752964AbZDFOvw (ORCPT ); Mon, 6 Apr 2009 10:51:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751290AbZDFOvj (ORCPT ); Mon, 6 Apr 2009 10:51:39 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:55382 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbZDFOvi (ORCPT ); Mon, 6 Apr 2009 10:51:38 -0400 Date: Mon, 6 Apr 2009 07:48:13 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Jens Axboe cc: Arjan van de Ven , Theodore Tso , Linux Kernel Developers List , Ext4 Developers List Subject: Re: [GIT PULL] Ext3 latency fixes In-Reply-To: <20090406081616.GT5178@kernel.dk> Message-ID: References: <20090404135719.GA9812@mit.edu> <20090404151649.GE5178@kernel.dk> <20090404173412.GF5178@kernel.dk> <20090404180108.GH5178@kernel.dk> <20090404232222.GA7480@mit.edu> <20090404163349.20df1208@infradead.org> <20090406081616.GT5178@kernel.dk> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1425 Lines: 35 On Mon, 6 Apr 2009, Jens Axboe wrote: > > Well, either you are submitting a single piece of IO (in which case you > just want to unplug or directly submit as part of the submit_bio()), or > you are submitting several IOS (in which case you just want to unplug at > the end of the IO submission, before waiting). That's not true. The plugging is often across multiple threads. It didn't _use_ to be (we always unplugged at wait), but it is now. Nothing else explains why that patch by Ted makes such a big throughput thing, because the code did ret = submit_bh(WRITE_SYNC, bh); wait_on_buffer(bh); ie it very much submits a _single_ IO, and waits on it. If plugging made a difference, that means that unplugging was delayed so long that somebody else does IO too - ie it gets delayed past a wait event. So according to your own rules, that submit_bh() _should_ use WRITE_SYNC, but something bad happens if it does. I'm not quite seeing _what_, though, unless there are multiple processes trying to dirty the _same_ buffer, and they win if they all can dirty it without doing IO on it in between (and then the write turns into just one write). Linus -- 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/