nvme: don't copy fill bio_vec if we don't have to
authorJens Axboe <axboe@kernel.dk>
Sat, 16 Oct 2021 14:20:13 +0000 (08:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 27 Mar 2022 21:20:13 +0000 (15:20 -0600)
commitdc173c9d1208af02d131d312d998b346f93a8c81
tree190052c416d145fe5efe9a15d516065b126aba84
parent03c40e57f86a1ee75af742e3be28e86fe7481759
nvme: don't copy fill bio_vec if we don't have to

For the fast case, we haven't done any IO on the bio yet. Hence just check
and return a pointer to the inlined bio_vec, rather than copying it. In
profiles, this results in a nice reduction in overhead for
nvme_queue_rq():

     5.41%     -2.48%  [nvme]            [k] nvme_queue_rq

Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c