]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] stream_sock: try to send pending data on chk_snd()
authorWilly Tarreau <w@1wt.eu>
Sun, 18 Jan 2009 16:38:44 +0000 (17:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Jan 2009 18:43:47 +0000 (19:43 +0100)
commita456f2a059aed7e308977f49d7200ad8b3a66636
tree0be608d44624f924daad78de7f546fee4c8cf834
parentd2def0fd254efab99be009b381b5361ce627a668
[MEDIUM] stream_sock: try to send pending data on chk_snd()

When the producer calls stream_sock_chk_snd(), we now try to send
all pending data asynchronously. If it succeeds, we don't have to
enable polling on the FD which saves about half of the calls to
epoll_wait().

In stream_sock_read(), we finally set the WAIT_ROOM flag as soon as
possible, in preparation of the splice code. We reset it when we
detect that some room has been released either in the buffer or in
the splice.
src/stream_sock.c