The rapid growth of io_uring
The rapid growth of io_uring
Posted Feb 10, 2020 3:29 UTC (Mon) by andresfreund (subscriber, #69562)In reply to: The rapid growth of io_uring by dcoutts
Parent article: The rapid growth of io_uring
Yes, that's correct to my knowledge. That wasn't the case in the first kernels with support for io_uring however (you need to test for IORING_FEAT_NODROP to know). But for poll like things it's also not that hard to handle the overflow case - just treat all of the sockets as ready. But that doesn't work at all for asynchronous network IO (rather than just readiness).
And obviously, you'd need to submit the 10k IORING_OP_POLL_ADDs in smaller batches, because the submission queue wouldn't be that long. But that's fine.
FWIW, I am fairly sure you can submit an IORING_OP_POLL_ADD on an epoll fd. Signal readiness once epoll_pwait would return (without returning the events of course). So if you need something for which oneshot style behaviour isn't best suited, or which you might want to wait on only some of the time, you can also compose io_uring and epoll. Caveat: I have not tested this, but I'm fairly sure I've seen code doing so, and a quick look in the code confirms that this should work: eventpoll_fops has a .poll implementation, which is what io_uring (via io_poll_add) relies on to register to get notified for readiness.
Posted May 25, 2020 23:25 UTC (Mon)
by rand0m$tring (guest, #125230)
[Link]
https://github.com/torvalds/linux/blob/444565650a5fe9c63d...
so that's the point at which it would reach capacity and fall over.
The rapid growth of io_uring