On Wed, Sep 20, 2017 at 02:11:49PM +0300, Avi Kivity wrote: > I think it's still preferable to avoid a workqueue and its non-deterministic > latencies and context switches if we can prove that a particular iocb will > not require a synchronous operation. If that can be done then 4.13 nowait > aio also works - the user provides the workqueue equivalent. The only > problem is if we can't prove in advance that an iocb will require blocking. The code is generally pessimistic and bails out rather too often. The only issue not solved is memory allocation, at the moment we could still block on them so this will need some more work. For XFS direct I/O the only memory allocations in that path should be the bios. > 1. Short writes - just ignore the tail of a too-large iovec. May cause > buggy applications to fail, so probably not a good idea. We could still do it the same way we did RWF_NOWAIT - require an explicit opt-in for what should be the defalt behavior because we change the historic behavior. > 3. Borrow the mm, and pin from the wq - I gather it was considered and > rejected, but maybe it can be reconsidered. It was done before in vendor kernels, and I think we also had code for it in a driver implementing aio. I'd need to look up the whole history as I don't remember it. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html