Replies: 4 comments 2 replies
-
Yep looks like there's a kernel bug there. I think the below should fix it:
|
Beta Was this translation helpful? Give feedback.
-
If we don't read the actual head, then we could return that there are entries left, even though the SQPOLL thread has not yet committed the SQRING consumption just yet. That race leaves a gap where the kernel returns "yep there are entries you can use" but the sqpoll thread hasn't committed the ones it's used just yet. |
Beta Was this translation helpful? Give feedback.
-
Committed a fix here: https://git.kernel.dk/cgit/linux/commit/?h=io_uring-6.12&id=91560bef6395aba347be1dd93c623435ce6760f4 If you'd like, I can add a Reported-by: tag to attribute the report to you. If you want that, then please give me a name + email that I can use for that. If you don't want it or don't care, that's fine too. |
Beta Was this translation helpful? Give feedback.
-
Added a test case as well to liburing. I'll close this one up, fix should go upstream this week and make its way back to the stable kernels as well. |
Beta Was this translation helpful? Give feedback.
-
The man page says:
In my experiments, IORING_SETUP_SQPOLL=1, and after the SQ gets full,
io_uring_sqring_wait
returns, even before there's free space in the SQ. Also in the liburing example,examples/proxy.c
, we have:Here
io_uring_sqring_wait
is used in a loop. Why? Shouldn't it wait for at least one free SQ entry, as documented?Beta Was this translation helpful? Give feedback.
All reactions