Since writes are immediate anyway (copy to kernel buffer and return), what is the advantage of using io_submit for writing?
In fact, this (aio / io_submit) seems worse, since you have to allocate write buffers to the heap and not use stack buffers.
My question is only about writing, not reading.
EDIT: I'm talking about relatively small scripts (no more than a few kilobytes), not MB or GB, so copying the buffer should not be a big problem.
Copying a buffer to the kernel is not necessarily instantaneous.
. ( -), . ( , , , ), , .
Linux , , . , , - , .
, . , , , .
, , . , ( ) .
aio_write() , , DMAd ( ), , .