]> www.infradead.org Git - users/hch/block.git/commit
rbd: increase io_opt again
authorChristoph Hellwig <hch@lst.de>
Fri, 31 May 2024 07:22:13 +0000 (09:22 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 14 Jun 2024 05:19:49 +0000 (07:19 +0200)
commit6d1b3ec8476ac13fc13f38644b22db48a24c6749
tree1ff6047ec629d59fc7097a6748ff85ec4a6e4b94
parent1143485aa2e7040189b0d484947a12b81996355d
rbd: increase io_opt again

Commit 16d80c54ad42 ("rbd: set io_min, io_opt and discard_granularity to
alloc_size") lowered the io_opt size for rbd from objset_bytes which is
4MB for typical setup to alloc_size which is typically 64KB.

The commit mostly talks about discard behavior and does mention io_min
in passing.  Reducing io_opt means reducing the readahead size, which
seems counter-intuitive given that rbd currently abuses the user
max_sectors setting to actually increase the I/O size.  Switch back
to the old setting to allow larger reads (the readahead size despite it's
name actually limits the size of any buffered read) and to prepare
for using io_opt in the max_sectors calculation and getting drivers out
of the business of overriding the max_user_sectors value.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c