Hi, On 2019-09-17 10:03:58 -0600, Jens Axboe wrote: > There's been a few requests for functionality similar to io_getevents() > and epoll_wait(), where the user can specify a timeout for waiting on > events. I deliberately did not add support for this through the system > call initially to avoid overloading the args, but I can see that the use > cases for this are valid. > This adds support for IORING_OP_TIMEOUT. If a user wants to get woken > when waiting for events, simply submit one of these timeout commands > with your wait call. This ensures that the application sleeping on the > CQ ring waiting for events will get woken. The timeout command is passed > in a pointer to a struct timespec. Timeouts are relative. Hm. This interface wouldn't allow to to reliably use a timeout waiting for io_uring_enter(..., min_complete > 1, ING_ENTER_GETEVENTS, ...) right? I can easily imagine usecases where I'd want to submit a bunch of ios and wait for all of their completion to minimize unnecessary context switches, as all IOs are required to continue. But with a relatively small timeout, to allow switching to do other work etc. - Andres