nvme: implement mq_ops->commit_rqs() hook
authorJens Axboe <axboe@kernel.dk>
Thu, 29 Nov 2018 17:02:29 +0000 (10:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Nov 2018 17:12:07 +0000 (10:12 -0700)
commit04f3eafda6e05adc56afed4d3ae6e24aaa429058
treeb4172871d7b739e0f15e49013f0c0fdb54a001cb
parentd666ba98f849ad44c4405ecc2180390ebe80f4f9
nvme: implement mq_ops->commit_rqs() hook

Split the command submission and the SQ doorbell ring, and add the
doorbell ring as our ->commit_rqs() hook. This allows a list of
requests to be issued, with nvme only writing the SQ update when
it's necessary. This is more efficient if we have lists of requests
to issue, particularly on virtualized hardware, where writing the
SQ doorbell is more expensive than on real hardware. For those cases,
performance increases of 2-3x have been observed.

The use case for this is plugged IO, where blk-mq flushes a batch of
requests at the time.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c