Re: Approaches to making io_submit not block

Christoph Hellwig
2011-08-31T05:26:34Z

On Tue, Aug 30, 2011 at 02:51:01PM -0700, Daniel Ehrenberg wrote:
> > Let filesystems handle this. ?I've actually prototyped it in XFS,
> > based on some pending work from Dave but at this point it's still butt
> > ugly.
>
> Great, would you be willing to let me see the draft code?
>
> Are you sure that there wouldn't be any benefit to having the code be
> in the aio/dio levels in terms of making it easier for file
> systems/reducing code duplication?

I'll get it polished up and send it out for RFC once Dave sends out
the updated allocation workqueue patch. With this he moves all
allocator calls in XFS into a workqueue. My direct I/O patch uses that
fact to use that workqueue for the allocator call and let the existing
aio retry infrastructure retry the direct I/O operation one that
workqueue has finished.

> > No way. ?I've fixed this for XFS, and it's trivial without the need to
> > queue them up. ?The only thing preventing appending writes to work is
> > a flag to tell the dio layer to just do them, just like it already works
> > for holes. ?(and more QA).
> >
> >
> Are you saying this is already fixed for XFS? Appends don't block,
> only reads to metadata do?

XFS-internal yes, just the generic direct I/O code doesn't let us do it
yet. Remember that XFS only updates the on-disk i_size after I/O
completion.