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>
Thu, 12 Aug 2021 17:27:01 +0000 (11:27 -0600)
commita4aa1b0494ea9e90022c4d9ff6d99aaf211cdf7c
treeef9e29cedba1708061d984eaa3ceab340aebf8e5
parent0c840fd720fb3a39a05156c598cbf954dea4c6f1
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