]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: stream_sock: reduce the amount of in-flight spliced data
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Dec 2011 21:11:47 +0000 (22:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Dec 2011 23:03:55 +0000 (00:03 +0100)
commiteb9fd5178e73bf1204a37e7b99edf6c9ccdb4bdd
treeee8e8b7887c23c0248acc7531610746fd1ef5f84
parent007257ebab378d260c8a0d6b53d1916f9d4fc174
OPTIM: stream_sock: reduce the amount of in-flight spliced data

First, it's a waste not to call chk_snd() when spliced data are available,
because the pipe can almost always be transferred into the outgoing socket
buffers. Starting from now, when we splice data in, we immediately try to
send them. This results in less pipes used, and possibly less kernel memory
in use at once.

Second, if a pipe cannot be transferred into the outgoing socket buffers,
it means this buffer is full. There's no point trying again then, as space
will almost never be available, resulting in a useless syscall returning
EAGAIN.
src/stream_sock.c