From owner-freebsd-fs@FreeBSD.ORG Fri Jul 5 15:24:32 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8181C97F for ; Fri, 5 Jul 2013 15:24:32 +0000 (UTC) (envelope-from BATV+29e3569f53842bc9067f+3603+infradead.org+hch@bombadil.srs.infradead.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) by mx1.freebsd.org (Postfix) with ESMTP id 730B21216 for ; Fri, 5 Jul 2013 15:24:32 +0000 (UTC) Received: from hch by bombadil.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uv7s7-0005ZV-ET; Fri, 05 Jul 2013 15:24:31 +0000 Date: Fri, 5 Jul 2013 08:24:31 -0700 From: Christoph Hellwig To: Zoltan Arnold NAGY Subject: Re: O_DIRECT|O_SYNC semantics? Message-ID: <20130705152431.GA21283@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2013 15:24:32 -0000 On Wed, Jul 03, 2013 at 09:05:40PM +0200, Zoltan Arnold NAGY wrote: > Hi, > > Could someone have a look here: > http://serverfault.com/questions/520141/please-explain-my-fio-results-is-o-synco-direct-misbehaving-on-linux > > Basically, I'm seeing wastly different results on Linux and on FreeBSD 9.1. > Either FreeBSD's not honoring O_SYNC properly, or Linux does something > wicked. > > I've been at it for a few days, without any real progress. For consumer disks using O_SYNC on Linux does make a huge difference, because it flushes the disk write cache after completion to make sure the O_SYNC gurantees that data has hit physical storage are met. It seems like FreeBSD might be missing that call.