Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753081AbZDFGZG (ORCPT ); Mon, 6 Apr 2009 02:25:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751960AbZDFGYx (ORCPT ); Mon, 6 Apr 2009 02:24:53 -0400 Received: from thunk.org ([69.25.196.29]:44148 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbZDFGYw (ORCPT ); Mon, 6 Apr 2009 02:24:52 -0400 Date: Mon, 6 Apr 2009 02:05:42 -0400 From: Theodore Tso To: Linus Torvalds Cc: Arjan van de Ven , Jens Axboe , Linux Kernel Developers List , Ext4 Developers List Subject: Re: [GIT PULL] Ext3 latency fixes Message-ID: <20090406060542.GA7376@mit.edu> Mail-Followup-To: Theodore Tso , Linus Torvalds , Arjan van de Ven , Jens Axboe , Linux Kernel Developers List , Ext4 Developers List 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> <20090405001005.GA7553@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@mit.edu X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1636 Lines: 32 On Sun, Apr 05, 2009 at 10:01:06AM -0700, Linus Torvalds wrote: > Of course, different IO schedulers react differently to that whole "sync > vs unplug" thing. I think CFQ is the only one that actually cares about > the "sync" bit (using different queues for sync vs async). It looks liks AS and CFQ both care about the "sync" bit; they both use rq_is_sync defined in include/lonux/blkdev.h. Deadline apparently only distinguishes between read and write requests, and not whether they are considered synchronous or not. The noop scheduler, obviously also doesn't care. :-) > The other schedulers only care about the plugging. So the patch > below really doesn't make much sense as-is, because as things are > right now, the scheduler behaviors are so different for the > unplug-vs-sync thing that no sane user can ever know whether they > should use WRITE_SYNC (== higher priority queueing for CFQ, no-op > for others) or WRITE_UNPLUG (unplug on all, and additionally higher > priority for CFQ). Well, if the deadline scheduler ignores the SYNC bit, it would still make sense for it to only unplug the queue after for the commit block, and not for any of the other writes to the journal. Unplugging after every synchronous write is going to lead to a performance problem, which I've demonstrated using the fopen/fprintf/fsync/fclose scenario that Jens pointed me at. - Ted -- 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/