haproxy/include/proto
Willy Tarreau 6c11bd2f89 OPTIM: raw-sock: don't speculate after a short read if polling is enabled
This is the reimplementation of the "done" action : when we experience
a short read, we're almost certain that we've exhausted the system's
buffers and that we'll meet an EAGAIN if we attempt to read again. If
the FD is not yet polled, the stream interface already takes care of
stopping the speculative read. When the FD is already being polled, we
have two options :
  - either we're running from a level-triggered poller, in which case
    we'd rather report that we've reached the end so that we don't
    speculate over the poller and let it report next time data are
    available ;

  - or we're running from an edge-triggered poller in which case we
    have no choice and have to see the EAGAIN to re-enable events.

At the moment we don't have any edge-triggered poller, so it's desirable
to avoid speculative I/O that we know will fail.

Note that this must not be ported to SSL since SSL hides the real
readiness of the file descriptor.

Thanks to this change, we observe no EAGAIN anymore during keep-alive
transfers, and failed recvfrom() are reduced by half in http-server-close
mode (the client-facing side is always being polled and the second recv
can be avoided). Doing so results in about 5% performance increase in
keep-alive mode. Similarly, we used to have up to about 1.6% of EAGAIN
on accept() (1/maxaccept), and these have completely disappeared under
high loads.
2014-01-26 00:42:32 +01:00
..
acl.h MINOR: acl/pattern: use types different from int to clarify who does what. 2013-12-02 23:31:33 +01:00
arg.h MAJOR: sample: maintain a per-proxy list of the fetch args to resolve 2013-04-03 02:13:02 +02:00
auth.h MINOR: acl/pattern: use types different from int to clarify who does what. 2013-12-02 23:31:33 +01:00
backend.h
channel.h BUG/MAJOR: http: always ensure response buffer has some room for a response 2013-06-08 13:14:17 +02:00
checks.h MINOR: checks: use an inline function for health_adjust() 2013-12-31 23:47:37 +01:00
compression.h MINOR: compression: CPU usage limit 2012-11-21 02:15:16 +01:00
connection.h CLEANUP: connection: use conn_xprt_ready() instead of checking the flag 2014-01-26 00:42:31 +01:00
cttproxy.h
dumpstats.h Revert "MEDIUM: stats: add support for HTTP keep-alive on the stats page" 2013-12-29 00:43:40 +01:00
fd.h OPTIM: raw-sock: don't speculate after a short read if polling is enabled 2014-01-26 00:42:32 +01:00
freq_ctr.h
frontend.h
hdr_idx.h
lb_chash.h
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h CLEANUP: fix missing include <string.h> in proto/listener.h 2013-06-14 19:52:17 +02:00
log.h MINOR: log: indicate it when some unreliable sample fetches are logged 2013-04-03 02:12:56 +02:00
map.h MINOR: map: export parse output sample functions 2013-12-12 15:44:05 +01:00
obj_type.h MINOR: obj: introduce a new type appctx 2013-12-09 15:40:22 +01:00
pattern.h MINOR: pattern: move functions for grouping pat_match_* and pat_parse_* and add documentation. 2014-01-21 22:14:21 +01:00
payload.h MINOR: payload: split smp_fetch_rdp_cookie() 2013-08-01 21:17:13 +02:00
peers.h
pipe.h
port_range.h
proto_http.h MINOR: http: switch the http state to an enum 2013-12-09 16:06:22 +01:00
proto_tcp.h BUG/MINOR: config: report the correct track-sc number in tcp-rules 2013-12-02 23:31:32 +01:00
proto_uxst.h
protocol.h
proxy.h
queue.h
raw_sock.h
sample.h MINOR: sample: make sample_parse_expr() use memprintf() to report parse errors 2013-12-12 23:16:54 +01:00
server.h BUG/MINOR: stats: correctly report throttle rate of low weight servers 2013-12-16 18:04:57 +01:00
session.h MINOR: session: add a simple function to retrieve a session from a task 2013-12-09 15:40:21 +01:00
shctx.h MINOR: ssl: Setting global tune.ssl.cachesize value to 0 disables SSL session cache. 2012-12-28 14:48:13 +01:00
signal.h
ssl_sock.h MEDIUM: log: report SSL ciphers and version in logs using logformat %sslc/%sslv 2012-10-12 20:48:51 +02:00
stick_table.h MEDIUM: stick-tables: flush old entries upon soft-stop 2013-09-04 17:54:01 +02:00
stream_interface.h MEDIUM: stream-int: make si_connect() return an established state when possible 2013-12-31 23:32:12 +01:00
task.h
template.h