mbox series

[PATCHSET,0/5] Enable alloc caching and batched freeing for passthrough

Message ID 20220922182805.96173-1-axboe@kernel.dk
Headers show
Series Enable alloc caching and batched freeing for passthrough | expand

Message

Jens Axboe Sept. 22, 2022, 6:28 p.m. UTC
Hi,

The passthrough IO path currently doesn't do any request allocation
batching like we do for normal IO. Wire this up through the usual
blk_mq_alloc_request() allocation helper.

Similarly, we don't currently supported batched completions for
passthrough IO. Allow the request->end_io() handler to return back
whether or not it retains ownership of the request. By default all
handlers are converted to returning RQ_END_IO_NONE, which retains
the existing behavior. But with that in place, we can tweak the
nvme uring_cmd end_io handler to pass back ownership, and hence enable
completion batching for passthrough requests as well.

This is good for a 10% improvement for passthrough performance. For
a non-drive limited test case, passthrough IO is now more efficient
than the regular bdev O_DIRECT path.