On 7/21/23 9:50?AM, Darrick J. Wong wrote: > On Thu, Jul 20, 2023 at 12:13:09PM -0600, Jens Axboe wrote: >> If the filesystem dio handler understands IOCB_DIO_DEFER, we'll get >> a kiocb->ki_complete() callback with kiocb->dio_complete set. In that >> case, rather than complete the IO directly through task_work, queue >> up an intermediate task_work handler that first processes this >> callback and then immediately completes the request. >> >> For XFS, this avoids a punt through a workqueue, which is a lot less >> efficient and adds latency to lower queue depth (or sync) O_DIRECT >> writes. >> >> Only do this for non-polled IO, as polled IO doesn't need this kind >> of deferral as it always completes within the task itself. This then >> avoids a check for deferral in the polled IO completion handler. >> >> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > > Seems pretty obvious to me, though I'm famous for not being an > experienced io_uring user yet... > > Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Thanks, keyword here is "yet" ;-) -- Jens Axboe