Daniel, Matt, could you review

 

https://github.com/ffilz/ntirpc/commits/nonblock

 

This needs to be compressed all down to a single patch, and some of the debug stuff removed (or set back to debug level rather than event or error).

 

The top (most recent) two patches are the significant bits to get it working as well as the MORE CODE 11 that deals with partially sent writes. The top patch, at Matt’s suggestion, removes the limit on send queues and instead puts a writeq in each duplex record. This simplified blocking additional writes while a blocked write is in progress since the existing queuing code node just queues them up behind the in-progress write whether it’s blocked or not.

 

The whole floating sr_rec goes away, the sr_rec per channel is sufficient, instead, each duplex record has both a receive and send event, and the xprt xp_fd is duplicated (dup) if we have blocking I/O (the combination of the duplicated fd and the 2nd event with EPOLLOUT instead of EPOLLIN is sufficient to manage the separate waiting for the tcp window to open again).

 

You might look at the diff between what I did and where Daniel left off (with “Turn on nonblocking”) or even the whole diff from next rather than looking at the piecemeal patches.

 

If you don’t see any gaping issues, I’ll talk with Daniel on Monday about how to render this into a reasonable set of patches for final review and merge.

 

Frank