* Non-blocking filesystem calls do not in fact work on files.
* Non-blocking filesystem calls do not in fact work on files. If you think about it for a minute this makes sense. Network data is flowing in to you asyncronously, it will show up if you don't do anything (and trigger poll). But you have to request to read a file to make the OS make the disk go get it. This is why the async read model works for disk files where the poll/read model doesn't; a disk file is always readable as the data is already there. In Linux in particular the kernel does not (I think, I may be getting the explanation wrong) have a wait queue for page faults, it can only block the faulting process, so you can't do async (non-blocking) cached file I/O at all. * It is not well documented in man pages. It's a relatively well-known problem if you google for it. * The situation for traditional non-blocking reads of disk files has persisted because it is unsolvable in general, poll/read just doesn't work for for reasons described above. You need async read/write, which Linux in particular does not have good support for (see above regarding cached reads). I think the situation on the BSDs may be better, but I'm not sure. There's a number of articles in the kernel section on LWN discussing async I/O that may be enlightening if you want to know more about what's been done here. ( http://lwn.net/Kernel/Index/#Asynchronous_IO )
Posted by phs2501 on Jun 21, 2015, 6:36 AM
Tags
Related issues
- That Reddit post is feeding more conspiracy thinking than helping.
- Support BYOK/Custom Models for Inline Code Completions
- DNS-PERSIST-01 challenge support (planned for late Q1 2026)
- Yeah I can't really blame people for not realising they have shitty mics and shitty internet because it's really hard for them to tell!
- Onboarding guide for FluentAssertions
- Add WebTransport support
Raise real-world problems, find people facing the same issue, and discuss solutions.6,000 issues0 comments
support (Network)
That Reddit post is feeding more conspiracy thinking than helping.
Support BYOK/Custom Models for Inline Code Completions
DNS-PERSIST-01 challenge support (planned for late Q1 2026)
Yeah I can't really blame people for not realising they have shitty mics and shitty internet because it's really hard for them to tell!
Onboarding guide for FluentAssertions
Add WebTransport support
> solar electricity is already cheaper than natural gas Does that include transmission?
Support for WireGuard only peers
* Non-blocking filesystem calls do not in fact work on files.
* Non-blocking filesystem calls do not in fact work on files. If you think about it for a minute this makes sense. Network data is flowing in to you asyncronously, it will show up if you don't do anything (and trigger poll). But you have to request to read a file to make the OS make the disk go get it. This is why the async read model works for disk files where the poll/read model doesn't; a disk file is always readable as the data is already there. In Linux in particular the kernel does not (I think, I may be getting the explanation wrong) have a wait queue for page faults, it can only block the faulting process, so you can't do async (non-blocking) cached file I/O at all. * It is not well documented in man pages. It's a relatively well-known problem if you google for it. * The situation for traditional non-blocking reads of disk files has persisted because it is unsolvable in general, poll/read just doesn't work for for reasons described above. You need async read/write, which Linux in particular does not have good support for (see above regarding cached reads). I think the situation on the BSDs may be better, but I'm not sure. There's a number of articles in the kernel section on LWN discussing async I/O that may be enlightening if you want to know more about what's been done here. ( http://lwn.net/Kernel/Index/#Asynchronous_IO )
Comments (0)
No comments yet. Start the discussion.