3 ms·
The problem with readiness-based IO for disk is that without starting the request it doesn't know where it needs to read on the disk to fetch, so it can't possi
by phs2501 8y ago
The problem with readiness-based IO for disk is that without starting the request it doesn't know where it needs to read on the disk to fetch, so it can't possibly tell you if the data's ready. If you were to limit file IO to streaming rather than random-access it could potentially work, but that's not the POSIX interface. Since pipes and sockets are streams they don't have this issue.
I'm not defending the suckiness of the AIO situation on Linux, but I understand why it is to some extent.
- ahartmetz 8y agoYou're right, I was working on an edit to address the problem while you wrote your comment :)
- loeg 8y agoAt a minimum it could tell you if the first byte at the fd offset is in cache, which it does not today. That'd at least get you a filesystem block (or more likely, 4k page). I agree this is less useful than, say, the full generality of NT IO completion.