]> Git Repo - linux.git/commit
ublk: remove segment count and size limits
authorUday Shankar <[email protected]>
Tue, 30 Apr 2024 21:16:24 +0000 (15:16 -0600)
committerJens Axboe <[email protected]>
Tue, 30 Apr 2024 21:36:50 +0000 (15:36 -0600)
commiteaf4a9b19b9961f8ca294c39c5f8984a4cf42212
treefceda50ff687c5afb6028b988fcd3a1afc7f38b0
parent01bc4fda9ea0a6b52f12326486f07a4910666cf6
ublk: remove segment count and size limits

ublk_drv currently creates block devices with the default max_segments
and max_segment_size limits of BLK_MAX_SEGMENTS (128) and
BLK_MAX_SEGMENT_SIZE (65536) respectively. These defaults can
artificially constrain the I/O size seen by the ublk server - for
example, suppose that the ublk server has configured itself to accept
I/Os up to 1M and the application is also issuing 1M sized I/Os. If the
I/O buffer used by the application is backed by 4K pages, the buffer
could consist of up to 1M / 4K = 256 physically discontiguous segments
(even if the buffer is virtually contiguous). As such, the I/O could
exceed the default max_segments limit and get split. This can cause
unnecessary performance issues if the ublk server is optimized to handle
1M I/Os. The block layer's segment count/size limits exist to model
hardware constraints which don't exist in ublk_drv's case, so just
remove those limits for the block devices created by ublk_drv.

Signed-off-by: Uday Shankar <[email protected]>
Reviewed-by: Riley Thomasson <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/ublk_drv.c
This page took 0.05473 seconds and 4 git commands to generate.