aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-07-13 22:07:11 +0800
committerJens Axboe <axboe@kernel.dk>2022-07-14 07:15:48 -0600
commit0edb3696c1713c42f52acbd8355b545e58f782b1 (patch)
tree8dd87ed20c47f5c19ed0153e8bb24bf20ff4c3a7 /include/uapi
parentublk_drv: add io_uring based userspace block driver (diff)
downloadwireguard-linux-0edb3696c1713c42f52acbd8355b545e58f782b1.tar.xz
wireguard-linux-0edb3696c1713c42f52acbd8355b545e58f782b1.zip
ublk_drv: support to complete io command via task_work_add
Use task_work_add if it is available, since task_work_add can bring up better performance, especially batching signaling ->ubq_daemon can be done. It is observed that task_work_add() can boost iops by +4% on random 4k io test. Also except for completing io command, all other code paths are same with completing io command via io_uring_cmd_complete_in_task. Meantime add one flag of UBLK_F_URING_CMD_COMP_IN_TASK for comparing the mode easily. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20220713140711.97356-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/ublk_cmd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/ublk_cmd.h b/include/uapi/linux/ublk_cmd.h
index 4f0c16ec875e..a3f5e7c21807 100644
--- a/include/uapi/linux/ublk_cmd.h
+++ b/include/uapi/linux/ublk_cmd.h
@@ -48,6 +48,12 @@
*/
#define UBLK_F_SUPPORT_ZERO_COPY (1UL << 0)
+/*
+ * Force to complete io cmd via io_uring_cmd_complete_in_task so that
+ * performance comparison is done easily with using task_work_add
+ */
+#define UBLK_F_URING_CMD_COMP_IN_TASK (1UL << 1)
+
/* device state */
#define UBLK_S_DEV_DEAD 0
#define UBLK_S_DEV_LIVE 1