Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2009 11:27:27 +1100
From:      Jan Mikkelsen <janm@transactionware.com>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        freebsd-fs@freebsd.org, Julian Elischer <julian@elischer.org>
Subject:   Re: Trying to understand how aio(4), mount(8) async (and gjournal) relate
Message-ID:  <49C97A6F.70204@transactionware.com>
In-Reply-To: <20090324224001.D1670@besplex.bde.org>
References:  <200903231733.51671.mel.flynn%2Bfbsd.fs@mailing.thruhere.net>	<49C7C45B.7040708@elischer.org> <20090324224001.D1670@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

[Jumping into a conversation on aio, async mounts, etc.]

I have had a few questions for a while that I haven't asked yet; these 
seems like an appropriate time to ask them!

Is it reasonable to open a file with O_FSYNC and then use aio_write() to 
issue multiple writes, and then assume that the data is on disk when the 
aio completes?

Can I get I/O parallelism using this approach?  I recall reading (some 
time ago) that FreeBSD doesn't do I/O parallelism on a single file 
descriptor.  Is that true?  Do I need to open the file multiple times in 
order to get I/O parallelism?

You can see where I'm going with this:  What I'd really like to do is 
open a file with O_FSYNC | O_DIRECT | O_EXCL, and then do lots of aio 
operations on it using chunks that a multiple of the page size with 
buffers that are aligned on page boundaries.  I'd like to know when aio 
writes are "really" complete to maintain various kinds of on-disk 
structures (eg. b-trees).  I'd also like to avoid call fsync(2).

Thanks,

Jan Mikkelsen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49C97A6F.70204>