On Wed, Oct 07, 2015 at 11:08:34AM -0400, Brian Foster wrote: > > > Second one is harder. We do need to write past the end of a file, actually > > > most of our writes are like that, so it would have been great for XFS to > > > handle this case asynchronously. > > > > You didn't say what kernel you're on, but these: > > > > 9862f62 xfs: allow appending aio writes > > 7b7a866 direct-io: Implement generic deferred AIO completions > > > > hit kernel v3.15. > > > > However, we had a bug report about this, and Brian has sent a fix > > which has not yet been merged, see: > > > > [PATCH 1/2] xfs: always drain dio before extending aio write submission > > > > on this list last week. > > > > With those 3 patches, things should just work for you I think. > > > > These fix some problems in that code, but the "beyond EOF" submission is > still synchronous in nature by virtue of cycling the IOLOCK and draining > pending dio. This is required to check for EOF zeroing, and we can't do > that safely without a stable i_size. > > Note that according to the commit Eric referenced above, ordering your > I/O to always append (rather than start at some point beyond the current > EOF) might be another option to avoid the synchronization here. Whether > that is an option is specific to your application, of course. > Our IO should be always append IIRC, the above explains why most aio we do is truly async, but may be somewhere there is a reordering and then we see synchronous behaviour. Will have to check it. -- Gleb. _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs