Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You do still need a single system call (io_uring_submit) to submit each batch of entries in the submission queue.

Edit: actually no it's not required in all cases. Thanks for the correction.



I only read about io_uring without yet having a chance of actually using it so take this with a grain of salt:

I read that io_uring has two modes, one where you signal via a system call and another that uses memory mapped polling.

https://unixism.net/loti/tutorial/sq_poll.html states:

> Reducing the number of system calls is a major aim for io_uring. To this end, io_uring lets you submit I/O requests without you having to make a single system call. This is done via a special submission queue polling feature that io_uring supports.


Submit is not a syscall. io_uring_enter is the only syscall that is used while running a ring. That one may submit, wait or both at the same time. Strictly speaking it isn't necessary but to avoid it you require elevated privileges.


From Linux 5.10 you only need CAP_SYS_NICE to perform SQPOLL: https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-fi...


Yes, hence "elevated" and not "root". It is still higher than default, right?


You can ask the kernel to poll the submission queue and skip io_uring_submit too. (Though you need elevated privileges to do this IIRC)


Not with SQPOLL. You can eliminate all syscalls with SQPOLL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: