OPTIM: http: set CF_READ_DONTWAIT on response message
authorWilly Tarreau <w@1wt.eu>
Sun, 15 Dec 2013 14:21:32 +0000 (15:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 16 Dec 2013 01:23:52 +0000 (02:23 +0100)
commit3f3997e6c6e994883611aa2420990108a8d32dc7
treee6ba30ed6084a092596aba8f82e085947f88e01d
parentad38acedaa7b5bd0f6c2f4d5816b331f35b7d07e
OPTIM: http: set CF_READ_DONTWAIT on response message

strace shows a lot of EAGAIN on small response messages. This
is caused by the fact that the READ_DONTWAIT flag is not set
on response message, it's only there when we want to flush
pending data.

For small responses, it's a waste of CPU cycles to call recv()
for nothing since most of the time, everything we'll need will
be in the first response. Also, this will offer more opportunities
for using splice() to transfer data.
src/proto_http.c