Replies: 12 comments 8 replies
-
This is missing the usual information, like what kernel you are running on. I wrote a quick test case for this and it works just fine for me:
Timing may be off a bit in general, it really depends on how the sqpoll loop is processing. But it should not be set much sooner than the specified time, it may trigger later than that however. |
Beta Was this translation helpful? Give feedback.
-
Have I misunderstood the SQPOLL mode? Why doesn't it work like this?
|
Beta Was this translation helpful? Give feedback.
-
After each enter, it should at least wait for one second before going to sleep, right? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
It has nothing to do with your test cases. I just want to know why |
Beta Was this translation helpful? Give feedback.
-
The way SQPOLL works is that it'll busy loop for Outside of that, it's the SQPOLL thread itself that both sets and clears the |
Beta Was this translation helpful? Give feedback.
-
I believe that |
Beta Was this translation helpful? Give feedback.
-
I mean, if the sqpoll thread runs as I want it to, we don't need that memory barrier. |
Beta Was this translation helpful? Give feedback.
-
To summarize:
The issue here is that in my test case, no sqe is submitted, but the timer refreshes. Is this some kind of undefined behavior? |
Beta Was this translation helpful? Give feedback.
-
I am using the low-level interface of io_uring, so this is unrelated to liburing. If there is a more suitable place for asking this question, I can close it.
Is it a correct assumption that when I use the IORING_ENTER_SQ_WAKEUP flag with the io_uring_enter call, IORING_SQ_NEED_WAKEUP will never be set within the sq_thread_idle time?
After calling io_uring_setup, I use IORING_ENTER_SQ_WAKEUP when calling io_uring_enter, which means that throughout the program, io_uring_enter is called at most once. My sq_thread_idle is set to 10,000, which is a long time. I then submit 4 sqe, which could be completed in less than a millisecond. However, not all four sqe are processed every time the program runs. I check the flags with
each time I submit sqe, and sometimes IORING_SQ_NEED_WAKEUP appears, and I don't understand why.
Beta Was this translation helpful? Give feedback.
All reactions