haproxy/src
Willy Tarreau bf883e0aa7 MAJOR: session: implement a wait-queue for sessions who need a buffer
When a session_alloc_buffers() fails to allocate one or two buffers,
it subscribes the session to buffer_wq, and waits for another session
to release buffers. It's then removed from the queue and woken up with
TASK_WAKE_RES, and can attempt its allocation again.

We decide to try to wake as many waiters as we release buffers so
that if we release 2 and two waiters need only once, they both have
their chance. We must never come to the situation where we don't wake
enough tasks up.

It's common to release buffers after the completion of an I/O callback,
which can happen even if the I/O could not be performed due to half a
failure on memory allocation. In this situation, we don't want to move
out of the wait queue the session that was just added, otherwise it
will never get any buffer. Thus, we only force ourselves out of the
queue when freeing the session.

Note: at the moment, since session_alloc_buffers() is not used, no task
is subscribed to the wait queue.
2014-12-24 23:47:33 +01:00
..
acl.c BUG/MEDIUM: pattern: don't load more than once a pattern list. 2014-11-24 15:40:16 +01:00
appsession.c BUILD: definitely silence some stupid GCC warnings 2013-12-13 15:21:36 +01:00
arg.c MINOR: arg: improve wording on error reporting 2013-12-13 00:38:47 +01:00
auth.c BUG/MEDIUM: auth: fix segfault with http-auth and a configuration with an unknown encryption algorithm 2014-08-29 21:06:31 +02:00
backend.c BUG/MAJOR: ns: HAProxy segfault if the cli_conn is not from a network connection 2014-12-19 23:39:29 +01:00
base64.c [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.c MEDIUM: buffer: add a new buf_wanted dummy buffer to report failed allocations 2014-12-24 23:47:32 +01:00
cfgparse.c BUG/MEDIUM: config: do not propagate processes between stopped processes 2014-12-18 14:03:31 +01:00
channel.c BUG/MEDIUM: channel: bi_putblk() must not wrap before the end of buffer 2014-04-24 17:19:21 +02:00
checks.c BUG/MEDIUM: tcp-checks: disable quick-ack unless next rule is an expect 2014-12-08 12:11:28 +01:00
chunk.c BUG/MINOR: chunk: Fix function chunk_strcmp and chunk_strcasecmp match a substring. 2014-05-09 19:16:13 +02:00
compression.c MEDIUM: buffer: use b_alloc() to allocate and initialize a buffer 2014-12-24 23:47:32 +01:00
connection.c MAJOR: namespace: add Linux network namespace support 2014-11-21 07:51:57 +01:00
cttproxy.c CLEANUP: cttproxy: remove a warning on undeclared close() 2012-10-05 22:18:07 +02:00
dumpstats.c MINOR: map/acl/dumpstats: remove the "Done." message 2014-12-18 23:29:46 +01:00
ev_epoll.c CLEANUP: epoll: epoll_events should be allocated according to global.tune.maxpollevents 2014-12-17 17:04:53 +01:00
ev_kqueue.c MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
ev_poll.c MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
ev_select.c MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
fd.c MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
freq_ctr.c BUG/MINOR: time: frequency counters are not totally accurate 2012-12-29 21:50:07 +01:00
frontend.c BUG/MAJOR: frontend: initialize capture pointers earlier 2014-11-18 18:53:43 +01:00
haproxy-systemd-wrapper.c BUG/MEDIUM: remove debugging code from systemd-wrapper 2014-09-24 12:59:25 +02:00
haproxy.c MAJOR: namespace: add Linux network namespace support 2014-11-21 07:51:57 +01:00
hash.c BUG/MEDIUM: backend: Update hash to use unsigned int throughout 2014-07-08 22:00:21 +02:00
hdr_idx.c OPTIM/MINOR: move the hdr_idx pools out of the proxy struct 2011-10-24 18:15:04 +02:00
i386-linux-vsys.c MEDIUM: listener: add support for linux's accept4() syscall 2012-10-08 20:11:03 +02:00
lb_chash.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fas.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwlc.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwrr.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_map.c MINOR: server: make use of srv_is_usable() instead of checking eweight 2014-05-23 14:29:11 +02:00
listener.c MEDIUM: listener: support rebinding during resume() 2014-07-08 01:13:35 +02:00
log.c MINOR: log: add a new field "%lc" to implement a per-frontend log counter 2014-08-28 15:08:14 +02:00
map.c BUG/MEDIUM: patterns: last fix was still not enough 2014-04-28 14:19:17 +02:00
memory.c MEDIUM: memory: improve pool_refill_alloc() to pass a refill count 2014-12-24 23:47:31 +01:00
namespace.c MAJOR: namespace: add Linux network namespace support 2014-11-21 07:51:57 +01:00
pattern.c BUG/MEDIUM: patterns: previous fix was incomplete 2014-11-26 13:17:03 +01:00
payload.c BUG/MEDIUM: payload: ensure that a request channel is available 2014-11-26 13:32:22 +01:00
peers.c MINOR: session: group buffer allocations together 2014-12-24 23:47:32 +01:00
pipe.c BUILD/MINOR: silent a build warning in src/pipe.c (fcntl) 2011-10-24 17:09:22 +02:00
proto_http.c MEDIUM: buffer: add a new buf_wanted dummy buffer to report failed allocations 2014-12-24 23:47:32 +01:00
proto_tcp.c BUG/MAJOR: namespaces: conn->target is not necessarily a server 2014-12-24 13:47:55 +01:00
proto_uxst.c BUG/MEDIUM: unix: completely unbind abstract sockets during a pause() 2014-07-08 01:13:35 +02:00
protocol.c REORG: split "protocols" files into protocol and listener 2012-09-15 22:29:32 +02:00
proxy.c BUG/MEDIUM: http: adjust close mode when switching to backend 2014-09-30 18:44:22 +02:00
queue.c MINOR: server: make use of srv_is_usable() instead of checking eweight 2014-05-23 14:29:11 +02:00
raw_sock.c BUG/MINOR: raw_sock: also consider ENOTCONN in addition to EAGAIN for recv() 2014-03-04 07:27:18 +01:00
rbtree.c [MINOR] imported the rbtree function from Linux kernel 2007-01-07 02:12:57 +01:00
regex.c MEDIUM: regex: Use pcre_study always when PCRE is used, regardless of JIT 2014-11-18 13:26:18 +01:00
sample.c BUG/MEDIUM: sample: fix random number upper-bound 2014-12-10 22:45:34 +01:00
server.c MAJOR: namespace: add Linux network namespace support 2014-11-21 07:51:57 +01:00
session.c MAJOR: session: implement a wait-queue for sessions who need a buffer 2014-12-24 23:47:33 +01:00
sessionhash.c [PATCH] appsessions: cleanup DEBUG_HASH and initialize request_counter 2008-08-13 23:43:26 +02:00
shctx.c MINOR: stats: add counters for SSL cache lookups and misses 2014-05-28 16:53:04 +02:00
signal.c BUG/MEDIUM: signal: signal handler does not properly check for signal bounds 2013-01-24 16:19:19 +01:00
ssl_sock.c BUILD: ssl: use OPENSSL_NO_OCSP to detect OCSP support 2014-12-09 20:49:22 +01:00
standard.c MINOR: sample: add "json" converter 2014-10-26 06:41:12 +01:00
stick_table.c BUG/MAJOR: tcp: fix a possible busy spinning loop in content track-sc* 2014-07-30 08:56:35 +02:00
stream_interface.c MAJOR: session: implement a wait-queue for sessions who need a buffer 2014-12-24 23:47:33 +01:00
task.c [OPTIM] task: don't scan the run queue if we know it's empty 2011-09-10 20:08:49 +02:00
time.c BUG/MINOR: time: frequency counters are not totally accurate 2012-12-29 21:50:07 +01:00
trace.c MINOR: add a new function call tracer for debugging purposes 2012-05-26 00:12:37 +02:00
uri_auth.c BUG/MEDIUM: uri_auth: missing NULL check and memory leak on memory shortage 2013-01-24 16:19:19 +01:00