All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
@ 2023-02-20  4:14 Ming Lei
  2023-02-22  2:02 ` Ziyang Zhang
  2023-02-22 16:54 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2023-02-20  4:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Ming Lei

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 <ming.lei@redhat.com>
---
 drivers/block/ublk_drv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index f48d213fb65e..09d29fa53939 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -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;
 
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
  2023-02-20  4:14 [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd Ming Lei
@ 2023-02-22  2:02 ` Ziyang Zhang
  2023-02-22 16:54 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Ziyang Zhang @ 2023-02-22  2:02 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe; +Cc: linux-block

On 2023/2/20 12:14, Ming Lei wrote:
> 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 <ming.lei@redhat.com>

Reviewed-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>

Regards,
Zhang
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
  2023-02-20  4:14 [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd Ming Lei
  2023-02-22  2:02 ` Ziyang Zhang
@ 2023-02-22 16:54 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2023-02-22 16:54 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-block


On Mon, 20 Feb 2023 12:14:13 +0800, Ming Lei wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
      (no commit info)

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-22 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  4:14 [PATCH] ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd Ming Lei
2023-02-22  2:02 ` Ziyang Zhang
2023-02-22 16:54 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.