From mboxrd@z Thu Jan 1 00:00:00 1970 From: Werner Almesberger Subject: Re: barriers vs. reads - O_DIRECT Date: Thu, 24 Jun 2004 14:46:38 -0300 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040624144638.V1325@almesberger.net> References: <20040623214845.A21586@almesberger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from almesberger.net ([63.105.73.238]:22533 "EHLO host.almesberger.net") by vger.kernel.org with ESMTP id S266798AbUFXRrY (ORCPT ); Thu, 24 Jun 2004 13:47:24 -0400 To: Bryan Henderson Content-Disposition: inline In-Reply-To: ; from hbryan@us.ibm.com on Thu, Jun 24, 2004 at 10:00:23AM -0700 List-Id: linux-fsdevel.vger.kernel.org Bryan Henderson wrote: > It seems obvious to me that whatever ordering guarantees the user gets > without the O_DIRECT flag, he should get with it as well. Yes, it would be nice if we could obtain such behaviour without unacceptable performance sacrifices. It seems to me that, if we can find an efficient way for serializing all write-write and read-write overlaps, plus have explicit barriers for serializing non-overlapping writes, this should yield pretty much what everyone wants (*). Now, that "if" needs a bit of work ... :-) (*) The only difference being that a completing read doesn't tell you whether the elevator has already passed a barrier. Currently, one could be lured into depending on this. > When I worry about I/O scheduling, I usually worry a lot more about block > device direct I/O (raw devices) than file direct I/O. The former is where > the block layer is most exposed to the user. I haven't looked at the direct IO code in detail, but it seems to me that the elevator behaviour affects file-based direct IO in the same way as the device-based one. - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / /_http://www.almesberger.net/____________________________________________/