4 ms·
> If you know your read and write patterns very well you can effectively use this for nearly asynchronous IO without the pains of AIO and few to none extra thre
by colanderman 9y ago
> If you know your read and write patterns very well you can effectively use this for nearly asynchronous IO without the pains of AIO and few to none extra threads.
The same is true of plain read/write, barring extra data copies to/from the kernel.
The only reason to ever use AIO is if you're doing direct I/O, in which case mmap doesn't apply.
- srcmap 9y ago"If you know your read and write patterns very well you can effectively use this for nearly asynchronous IO without the pains of AIO and few to none extra threads." I have seen Windows File Explorer lock up over and over again for the same assumption. They assume the dir scan is fast operation. A slow, bad USB drive, NFS, Samba mount, or trying to scan directory with thousands of files will lockup the GUI for long period of time. Dragging a file over slow/busy system icon with SMB mount will just spin / hang the whole GUI - not a very good UX.
- deleted 9y ago[deleted]