bio: optimize initialization of a bio
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Aug 2021 15:20:04 +0000 (09:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Aug 2021 19:44:02 +0000 (13:44 -0600)
commitda521626ac620d8719d674a48b8ec3620eefd42a
tree6ca053daded37aa4db152ca4e221de9db725e303
parentfd08e5309bba8672c1190362dff6c92bfd59218d
bio: optimize initialization of a bio

The memset() used is measurably slower in targeted benchmarks, wasting
about 1% of the total runtime, or 50% of the (later) hot path cached
bio alloc. Get rid of it and fill in the bio manually.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c