Re:Lord of the io_uring: io_uring tutorial, examples and ref...
by WGH_ on Monday May 11, 2020 @07:13PM
(#23148409)
> Even today if you are running async IO in userspace (e.g. using epoll), it's not very obvious where something went wrong, because no task is seemingly blocked.
It doesn't apply to file IO, which is never non-blocking, and can't be made async with epoll. Epoll always considers files ready for any IO. And if the device is slow, the thread is blocked with dreaded "D" state.
Re:Lord of the io_uring: io_uring tutorial, examples and ref...
by CodesInChaos on Tuesday May 12, 2020 @09:27AM
(#23153721)
The fundamental problem is that readiness based async IO and random access to not mix well. You'd need a way to poll readiness for different positions in the same file at the same time.
Completion based async (including io_uring on Linux or IO completion ports on Windows) doesn't suffer from this problem.
Re:Lord of the io_uring: io_uring tutorial, examples and ref...
by Doxin on Monday May 11, 2020 @05:44AM
(#23140398)
> It will only contain the information since the last task resumption
That's an implementation detail though. As far as I'm aware python keeps hold of the stack, so it outputs complete stack traces as you'd expect from synchronous code.
Even if pause execution while inside the application code there might not be a great stack which contains all relevant data. It will only contain the information since the last task resumption (e.g. through a callback). Depending on your solution (C callbacks, C++ closures, C# or Kotlin async/await, Rust async/await) the information will be between not very helpful and somewhat understandable, but never on par with a synchronous call.