kqueue on FreeBSD is effectively like io_uring but has existed for much longer (and Windows I/O Completion Ports predate kqueue). kqueue also gives you a way to get system events which you can't get on Linux (it has an equivalent of cn_proc that isn't awful).
Huh? Kqueue is nice, but I don't think you'll get anywhere near the performance of io_uring out of kqueue:
- kqueue only tells you there's data to read (/space in the write buffer). You still need to call read() or write(), including paying the cost of the syscall. io_uring lets you batch a lot of read/write calls together and either issue a single syscall to the kernel for all calls, or have the kernel poll and never syscall at all.
- kqueue doesn't let you issue fsync, or any of the other syscalls now in io_uring. fsync is essential on the write path for correctness in lots of cases, and for that you still need to dispatch to a local thread pool or something.
So yeah, I prefer kqueue over linux's epoll. But io_uring seems like the new king.
As the other commentor pointed out, I was wrong -- I'd mixed up the correspondence between kqueue and epoll with io_uring. Yeah kqueue doesn't allow asynchronous operations. Sadly I can't delete or edit my comment.
Yes, sorry I muddled things up (and now the edit window has elapsed). io_uring isn't the same as kqueue because it doesn't permit asynchronous notification of job completion nor can you do more complicated chained operations, epoll is the Linux equivalent of kqueue (and in that comparison, kqueue is better).