Are iocb requests passed to kernel evaluated in order or not?

108 Views Asked by At

I read 2 posts related to Linux AIO (native AIO).

  1. https://blog.cloudflare.com/io_submit-the-epoll-alternative-youve-never-heard-about/

It's important to note the iocb requests passed to kernel are evaluated in-order sequentially.

  1. https://github.com/littledan/linux-aio

io_submit allows an array of pointers to struct iocbs to be submitted all at once. In this function call, nr is the length of the ios array. If multiple operations are sent in one array, then no ordering guarantees are given between the iocbs.

The 2. article uses #include <liaio.h> and as far as I know, it's merely a wrapper of Linux AIO system calls. So I am confused why one of the articles says "in-order" while another says "no ordering guarantees"?

Which description is wrong? It would be appreciated if someone could provide a code snippet to test.

0

There are 0 best solutions below