unix_msg: introduce send queue caching
authorRalph Boehme <slow@samba.org>
Fri, 19 Aug 2016 14:25:11 +0000 (16:25 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 12 Sep 2016 22:19:27 +0000 (00:19 +0200)
commit16d076662139be1e1ebd5f26509bad3188dd9bc8
tree0bb5c6bf3fe914735c7e81b48b169deb5020acea
parentbb526a61d1970617a349781f67cd955b282335c4
unix_msg: introduce send queue caching

This introduces caching of unix datagram send queues. Right now send
queues are only created for peers if the channel to the peer is full and
a send reported EWOULDBLOCK.

At this stage, performance will actually be slightly worse, because now
if there's a cached queue for a peer without queued messages, we don't
attempt direct send anymore until the send queue is removed from the
cache.

The next commit will modify unix_msg to always create a send queue with
the datagram socket in connected mode and again attempt an non-blocking
send on the connected socket first. Then only if that returns
EWOULDBLOCK, the send has to go through the threadpool.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/unix_msg/unix_msg.c
source3/lib/unix_msg/unix_msg.h
source3/lib/unix_msg/wscript_build