ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
Subsystems (2)
PATCH 1/1 ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
commit 9c7c4bc986932218fd0df9d2a100509772028fb1 upstream
sizeof(struct ublksrv_io_cmd) is 16bytes, which can be held in 64byte SQE, so not necessary to check IO_URING_F_SQE128.
With this change, we get chance to save half SQ ring memory.
Fixed: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Signed-off-by Ming Lei <[email protected]>
Signed-off-by Jens Axboe <[email protected]>
--- drivers/block/ublk_drv.c | 3 --- 1 file changed, 3 deletions(-)
drivers/block/ublk_drv.c +0 -3
@@ -1271,9 +1271,6 @@ static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) __func__, cmd->cmd_op, ub_cmd->q_id, tag, ub_cmd->result); -if (!(issue_flags &IO_URING_F_SQE128 )) - goto out; -if (ub_cmd->q_id >= ub->dev_info.nr_hw_queues) goto out;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerQuoted 32 lines · Ming Lei
commit
9c7c4bc986932218fd0df9d2a100509772028fb1upstream
sizeof(struct ublksrv_io_cmd)is 16bytes, which can be held in 64byte SQE, so not necessary to checkIO_URING_F_SQE128.With this change, we get chance to save half SQ ring memory.
Fixed:
71f28f3136af("ublk_drv: addio_uringbased userspace block driver")Signed-off-by Ming Lei <[email protected]>Signed-off-by Jens Axboe <[email protected]>--- drivers/block/ublk_drv.c | 3 --- 1 file changed, 3 deletions(-)drivers/block/ublk_drv.c +0
-3@@ -1271,9 +1271,6 @@ static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) __func__, cmd->cmd_op, ub_cmd->q_id, tag, ub_cmd->result); -if (!(issue_flags &IO_URING_F_SQE128 )) - goto out; -if (ub_cmd->q_id >= ub->dev_info.nr_hw_queues) goto out;Signature · 1 line
2.40.1
Now queued up, thanks.
greg k-h