block: cache inode size in bdev
authorJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 17:39:45 +0000 (11:39 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:43:23 +0000 (14:43 -0600)
commitf09313c57a17683cbcb305989daf1d94b49fd32c
treee3c46d53930f6a7ba67f021f60ddb291f0722602
parente4ae4735f7c2da77db57ee090b9f513bfe80d285
block: cache inode size in bdev

Reading the inode size brings in a new cacheline for IO submit, and
it's in the hot path being checked for every single IO. When doing
millions of IOs per core per second, this is noticeable overhead.

Cache the nr_sectors in the bdev itself.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
block/partitions/core.c
include/linux/blk_types.h
include/linux/genhd.h