haproxy/src
Willy Tarreau 364f25a688 MINOR: backend: don't always takeover from the same threads
The next thread walking algorithm in commit 566df309c ("MEDIUM:
connections: Attempt to get idle connections from other threads.")
proved to be sufficient for most cases, but it still has some rough
edges when threads are unevenly loaded. If one thread wakes up with
10 streams to process in a burst, it will mainly take over connections
from the next one until it doesn't have anymore.

This patch implements a rotating index that is stored into the server
list and that any thread taking over a connection is responsible for
updating. This way it starts mostly random and avoids always picking
from the same place. This results in a smoother distribution overall
and a slightly lower takeover rate.
2020-07-01 16:07:43 +02:00
..
51d.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
acl.c BUILD: Re-enable -Wimplicit-fallthrough 2020-06-11 16:49:37 +02:00
action.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
activity.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
applet.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
arg.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
auth.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
backend.c MINOR: backend: don't always takeover from the same threads 2020-07-01 16:07:43 +02:00
base64.c REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
cache.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
calltrace.c REORG: include: move time.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
cfgparse-global.c MEDIUM: peers: add the "localpeer" global option 2020-06-19 11:37:30 +02:00
cfgparse-listen.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
cfgparse-ssl.c REORG: include: move cfgparse.h to haproxy/cfgparse.h 2020-06-11 10:18:58 +02:00
cfgparse.c BUG/MINOR: threads: Don't forget to init each thread toremove_lock. 2020-06-29 17:50:29 +02:00
channel.c REORG: include: move channel.h to haproxy/channel{,-t}.h 2020-06-11 10:18:58 +02:00
check.c BUG/MEDIUM: checks: Fix off-by-one in allocation of SMTP greeting cmd 2020-06-12 16:18:02 +02:00
chunk.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
cli.c MINOR: activity: add per-thread statistics on FD takeover 2020-06-29 14:26:05 +02:00
compression.c BUILD: compression: make gcc 10 happy with free_zlib() 2020-06-14 08:00:19 +02:00
connection.c MINOR: connection: align toremove_{lock,connections} and cleanup into idle_conns 2020-06-28 10:52:36 +02:00
da.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
debug.c MINOR: tasks: make run_tasks_from_lists() scan the queues itself 2020-06-24 12:21:26 +02:00
dgram.c REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dict.c REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
dns.c REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dynbuf.c REORG: buffer: rename buffer.c to dynbuf.c 2020-06-29 09:26:59 +02:00
eb32sctree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb32tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb64tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebimtree.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
ebistree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebmbtree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebpttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebsttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebtree.c BUG/MEDIUM: ebtree: use a byte-per-byte memcmp() to compare memory blocks 2020-06-16 11:30:33 +02:00
ev_epoll.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_evports.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_kqueue.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_poll.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_select.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
extcheck.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
fcgi-app.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
fcgi.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
fd.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
filters.c REORG: include: move cfgparse.h to haproxy/cfgparse.h 2020-06-11 10:18:58 +02:00
flt_http_comp.c REORG: include: move cfgparse.h to haproxy/cfgparse.h 2020-06-11 10:18:58 +02:00
flt_spoe.c MINOR: spoe: Don't systematically create new applets if processing rate is low 2020-06-25 21:50:20 +02:00
flt_trace.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
freq_ctr.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
frontend.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
h1.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
h1_htx.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
h2.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
haproxy.c BUG/MINOR: haproxy: don't wake already stopping threads on exit 2020-06-29 21:54:38 +02:00
hash.c REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
hlua.c BUILD: Re-enable -Wimplicit-fallthrough 2020-06-11 16:49:37 +02:00
hlua_fcn.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-dec.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-enc.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-huff.c REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-tbl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http.c MINOR: http: Add support for http 413 status 2020-06-26 11:30:02 +02:00
http_acl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http_act.c BUG/MINOR: http-rules: Fix ACLs parsing for http deny rules 2020-06-30 09:32:03 +02:00
http_ana.c BUG/MINOR: http-ana: Don't wait to send 1xx responses generated by HAProxy 2020-06-25 21:50:20 +02:00
http_conv.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http_fetch.c BUG/MEDIUM: fetch: Fix hdr_ip misparsing IPv4 addresses due to missing NUL 2020-06-26 17:42:41 +02:00
http_htx.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
http_rules.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
htx.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
lb_chash.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fas.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fwlc.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fwrr.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_map.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
listener.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
log.c BUG/MEDIUM: log-format: fix possible endless loop in parse_logformat_string() 2020-07-01 06:30:50 +02:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
map.c MEDIUM: map: make the "clear map" operation yield 2020-06-19 16:57:51 +02:00
mux_fcgi.c MINOR: mux-fcgi: avoid taking the toremove_lock in on dying tasks 2020-06-30 14:06:19 +02:00
mux_h1.c MINOR: mux-h1: avoid taking the toremove_lock in on dying tasks 2020-06-30 14:06:19 +02:00
mux_h2.c MINOR: mux-h2: avoid taking the toremove_lock in on dying tasks 2020-06-30 14:06:19 +02:00
mux_pt.c REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
mworker-prog.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
mworker.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
namespace.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
pattern.c BUG/MEDIUM: pattern: Add a trailing \0 to match strings only if possible 2020-06-30 19:16:47 +02:00
payload.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
peers.c BUILD: Re-enable -Wimplicit-fallthrough 2020-06-11 16:49:37 +02:00
pipe.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
pool.c MINOR: pools: move the LRU cache heads to thread_info 2020-06-29 10:36:37 +02:00
proto_sockpair.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
proto_tcp.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
proto_uxst.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
protocol.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
proxy.c MINOR: cli/proxy: add a new "show servers conn" command 2020-07-01 10:32:54 +02:00
queue.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
raw_sock.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
regex.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
ring.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
sample.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
server.c MEDIUM: server: add a new pool-low-conn server setting 2020-07-01 15:23:15 +02:00
session.c REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
sha1.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
shctx.c REORG: include: split global.h into haproxy/global{,-t}.h 2020-06-11 10:18:58 +02:00
signal.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
sink.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
ssl_ckch.c BUG/MEDIUM: ssl/cli: 'commit ssl cert' crashes when no private key 2020-06-24 16:52:22 +02:00
ssl_crtlist.c MINOR: cli/ssl: handle trailing slashes in crt-list commands 2020-06-25 15:40:10 +02:00
ssl_sample.c MINOR: ssl: add the ssl_s_* sample fetches for server side certificate 2020-06-25 21:22:24 +02:00
ssl_sock.c MINOR: ssl: move the ckch/crtlist deinit to ssl_sock.c 2020-06-24 09:57:18 +02:00
ssl_utils.c REORG: include: move ssl_sock.h to haproxy/ssl_sock{,-t}.h 2020-06-11 10:18:58 +02:00
stats.c MINOR: stats: add the estimated need of concurrent connections per server 2020-06-29 16:29:11 +02:00
stick_table.c CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
stream.c MINOR: cli: make "show sess" stop at the last known session 2020-06-28 01:41:56 +02:00
stream_interface.c BUG/MINOR: stream-int: Don't wait to send truncated HTTP messages 2020-06-25 21:50:20 +02:00
task.c BUG/MINOR: sched: properly cover for a rare MT_LIST_ADDQ() race 2020-06-30 14:06:19 +02:00
tcp_rules.c BUG/MINOR: tcp-rules: tcp-response must check the buffer's fullness 2020-06-15 18:16:20 +02:00
tcpcheck.c BUG/MEDIUM: checks: Increment the server's curr_used_conns 2020-06-28 16:23:09 +02:00
thread.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
time.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
tools.c MINOR: cfgparse: sanitize the output a little bit 2020-06-25 09:43:27 +02:00
trace.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
uri_auth.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
vars.c BUG/MAJOR: vars: Fix bogus free() during deinit() for http-request rules 2020-06-15 18:51:11 +02:00
version.c BUILD: Fix build by including haproxy/global.h 2020-06-16 23:36:04 +02:00
wdt.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
wurfl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
xprt_handshake.c REORG: include: move stream_interface.h to haproxy/stream_interface{,-t}.h 2020-06-11 10:18:58 +02:00
xxhash.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00