Re: [PATCH] iouring: Fix min_timeout behaviour
Jens Axboe <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 6/6/26 2:11 PM, Christian A. Ehrhardt wrote: > The wakeup condition if a min timeout is present and has > expired is that at least _one_ CQE was posted. Thus set > the cq_tail target to ->cq_min_tail + 1. Without this > commit a spurious wakeup can result in a premature wakeup > because io_should_wake() will return true even if _no_ CQE > was posted at all. > > Tested by running the liburing testsuite with no regressions. > > Additionally, tested by turning all calls to schedule() in > io_uring/wait.c into calls to schedule_timeout(1) to force > the spurious wakeups. With these spurious wakeups the > min-timeout.t test fails before and passes after this commit. Either this or the test case is broken, with or without the change you sent for the test case. I'll take a look, but it's definitely not passing as-is. -- Jens Axboe