Message ID | 20220927014420.71141-1-axboe@kernel.dk (mailing list archive) |
---|---|
Headers | show |
Series | Enable alloc caching and batched freeing for passthrough | expand |
On Tue, Sep 27, 2022 at 7:14 AM Jens Axboe <axboe@kernel.dk> wrote: > > 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. > > Changes since v1: > - Remove spurious semicolon > - Cleanup struct nvme_uring_cmd_pdu handling > > -- > Jens Axboe > > I see an improvement of ~12% (2.34 to 2.63 MIOPS) with polling enabled and an improvement of ~4% (1.84 to 1.92 MIOPS) with polling disabled using the t/io_uring utility (in fio) in my setup with this patch series! -- Anuj Gupta
On 9/28/22 7:23 AM, Anuj gupta wrote: > On Tue, Sep 27, 2022 at 7:14 AM Jens Axboe <axboe@kernel.dk> wrote: >> >> 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. >> >> Changes since v1: >> - Remove spurious semicolon >> - Cleanup struct nvme_uring_cmd_pdu handling >> >> -- >> Jens Axboe >> >> > I see an improvement of ~12% (2.34 to 2.63 MIOPS) with polling enabled and > an improvement of ~4% (1.84 to 1.92 MIOPS) with polling disabled using the > t/io_uring utility (in fio) in my setup with this patch series! Thanks for your testing! I'll add your reviewed-by to the series.
Series looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>