News for hackers. Stuff that matters.
Re:I/O Access Methods for Linux by colanderman on Thursday October 05, 2017 @05:06PM (#15412588)
> try performing reads from your network thread and if unavailable

How does this differ from recv(..., MSG_DONTWAIT)?

Re:I/O Access Methods for Linux by mtanski on Thursday October 05, 2017 @05:37PM (#15412767)
This was my original model when I came up with the idea; in fact, my v1 hack used recv and MSG_DONTWAIT. For a number of a reasons the kernel community did not want to overload that interface and that flag.

Besides some technical reasons, the big reason was an "impedance mismatch" of the recv API which was working with stream data. In that context you're depending on another party send data. Also, you can wait on this to happen using another API (select et. al) so the buffer will be filled not by your actions. On the other hand preadv2(..., RWF_NOWAIT) is not going to trigger any more read in and theres no wait to wait on the data. Although the previous statement is not a 100% true... preadv2 may or may not trigger readahead (if it's enabled).

Here's the whole thread about it... if you're interested in the history of how this came to be: https://lkml.org/lkml/2014/7/24/787

Re:I/O Access Methods for Linux by tmzt on Thursday October 05, 2017 @05:29PM (#15412722)
I think he means perform a disk read in response to a network request, and choose to respond to a different queued/pooled request if the data is not available to complete it.

I would assume the intent is similar but applied to a different type/source of IO.