summaryrefslogtreecommitdiff
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorHao Xu <haoxu@linux.alibaba.com>2020-11-03 10:54:37 +0800
committerJens Axboe <axboe@kernel.dk>2020-12-09 12:03:59 -0700
commitc73ebb685fb6dfb513d394cbea64fb81ba3d994f (patch)
treec36cd7f887cc1a711627b960fc7065a7eef8b995 /include/linux/syscalls.h
parent27926b683db03be307c6905b44ecfc1f081d9d6f (diff)
downloadlwn-c73ebb685fb6dfb513d394cbea64fb81ba3d994f.tar.gz
lwn-c73ebb685fb6dfb513d394cbea64fb81ba3d994f.zip
io_uring: add timeout support for io_uring_enter()
Now users who want to get woken when waiting for events should submit a timeout command first. It is not safe for applications that split SQ and CQ handling between two threads, such as mysql. Users should synchronize the two threads explicitly to protect SQ and that will impact the performance. This patch adds support for timeout to existing io_uring_enter(). To avoid overloading arguments, it introduces a new parameter structure which contains sigmask and timeout. I have tested the workloads with one thread submiting nop requests while the other reaping the cqe with timeout. It shows 1.8~2x faster when the iodepth is 16. Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com> Signed-off-by: Hao Xu <haoxu@linux.alibaba.com> [axboe: various cleanups/fixes, and name change to SIG_IS_DATA] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 37bea07c12f2..8576e8bf92fe 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -317,7 +317,7 @@ asmlinkage long sys_io_uring_setup(u32 entries,
struct io_uring_params __user *p);
asmlinkage long sys_io_uring_enter(unsigned int fd, u32 to_submit,
u32 min_complete, u32 flags,
- const sigset_t __user *sig, size_t sigsz);
+ const void __user *argp, size_t argsz);
asmlinkage long sys_io_uring_register(unsigned int fd, unsigned int op,
void __user *arg, unsigned int nr_args);