News for hackers. Stuff that matters.
Re:What's So Bad About Posix I/O? by MichaelMoser123 on Tuesday September 12, 2017 @05:26AM (#15225919)
you can do io_submit from one thread and then have some dedicated threads do io_getevent + event signalling (comes at a price though).

Still all this event goodness is not good enough for things like infiniband and the brave world of zero copy networking.

Re:What's So Bad About Posix I/O? by exDM69 on Tuesday September 12, 2017 @06:05AM (#15226062)
Yeah, sure that kinda works but it won't play nice with having an event loop on network events. A typical high performance server has multiple worker threads waiting on events on a select/epoll and if you add in another thread (or several) waiting on io_getevent you end up in a rather contrived solution.

You could use a pipe or eventfd or some other fd-based mechanism to wake up a worker thread on a filesystem event, but then you get two context switches (one to wake up io_getevent thread and another to wake up a worker). This carries a lot of indirect costs from jumping back and forth to the kernel.

I am unaware of a solution that would make filesystem i/o and network i/o play nice in one event loop without adding some overhead.