blk-mq: use list_splice_tail_init() to insert requests
authorMing Lei <ming.lei@redhat.com>
Mon, 2 Jul 2018 09:35:58 +0000 (17:35 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:53 +0000 (09:07 -0600)
commit3f0cedc7e9a0b32e79c79d2aac0c96d2b870ae55
treed89b81817e3e11e00965ca756a404cb7f2c57baf
parentc018c84fdb453ae057f3bcc87a1f1f730d41628b
blk-mq: use list_splice_tail_init() to insert requests

list_splice_tail_init() is much more faster than inserting each
request one by one, given all requets in 'list' belong to
same sw queue and ctx->lock is required to insert requests.

Cc: Laurence Oberman <loberman@redhat.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Tested-by: Kashyap Desai <kashyap.desai@broadcom.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c