haproxy/include/types
Willy Tarreau f31af9367e MEDIUM: lua: don't call the GC as often when dealing with outgoing connections
In order to properly close connections established from Lua in case
a Lua context dies, the context currently automatically gets a flag
HLUA_MUST_GC set whenever an outgoing connection is used. This causes
the GC to be enforced on the context's death as well as on yield. First,
it does not appear necessary to do it when yielding, since if the
connections die they are already cleaned up. Second, the problem with
the flag is that even if a connection gets properly closed, the flag is
not removed and the GC continues to be called on the Lua context.

The impact on performance looks quite significant, as noticed and
diagnosed by Sadasiva Gujjarlapudi in the following thread:

  https://www.mail-archive.com/haproxy@formilux.org/msg35810.html

This patch changes the flag for a counter so that each created
connection increments it and each cleanly closed connection decrements
it. That way we know we have to call the GC on the context's death only
if the count is non-null. As reported in the thread above, the Lua
performance gain is now over 20% by doing this.

Thanks to Sada and Thierry for the design discussion and tests that
led to this solution.
2020-01-14 10:12:31 +01:00
..
acl.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
action.h MINOR: stick-table: allow sc-set-gpt0 to set value from an expression 2019-11-15 18:24:19 +01:00
activity.h MAJOR: fd: Get rid of the fd cache. 2019-07-31 14:12:55 +02:00
applet.h CLEANUP: ssl/cli: remove leftovers of bundle/certs (it < 2) 2019-10-30 17:52:34 +01:00
arg.h MEDIUM: stick-table: Stop handling stick-tables as proxies. 2019-05-07 06:54:06 +02:00
auth.h MAJOR: auth: Change the internal authentication system. 2014-03-17 18:06:06 +01:00
backend.h MEDIUM: backend: move all LB algo parameters into an union 2019-01-14 19:33:17 +01:00
capture.h CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
channel.h CLEANUP: channel: Remove the unused flag CF_WAKE_CONNECT 2019-07-19 09:24:12 +02:00
checks.h MEDIUM: connection: Upstream SOCKS4 proxy support 2019-05-31 17:24:06 +02:00
cli.h MINOR: cli: add an expert mode to hide dangerous commands 2019-10-24 18:38:00 +02:00
compression.h MAJOR: buffer: finalize buffer detachment 2018-07-19 16:23:43 +02:00
connection.h CLEANUP: connection: merge CO_FL_NOTIFY_DATA and CO_FL_NOTIFY_DONE 2019-12-27 16:38:47 +01:00
counters.h MINOR: counters: Add fields to store the max observed for {q,c,d,t}_time 2019-11-15 14:23:21 +01:00
dict.h MINOR: dict: Store the length of the dictionary entries. 2019-06-07 15:47:54 +02:00
dns.h MEDIUM: dns: Add resolve-opts "ignore-weight" 2019-11-21 17:25:31 +01:00
fcgi-app.h MEDIUM: fcgi-app: Add FCGI application and filter 2019-09-17 10:18:54 +02:00
fd.h MINOR: pollers: add a new flag to indicate pollers reporting ERR & HUP 2019-12-27 14:04:33 +01:00
filters.h MEDIUM: filters: Adapt filters API to allow again TCP filtering on HTX streams 2019-11-15 13:43:08 +01:00
freq_ctr.h [MINOR] freq_ctr: add new types and functions for periods different from 1s 2010-08-10 14:01:09 +02:00
global.h REORG: listener: move the global listener queue code to listener.c 2019-12-10 14:16:03 +01:00
hlua.h MEDIUM: lua: don't call the GC as often when dealing with outgoing connections 2020-01-14 10:12:31 +01:00
http_ana.h MINOR: http-ana: Remove err_state field from http_msg 2019-09-17 10:18:54 +02:00
http_htx.h REORG: htx: merge types+proto into common/htx.h 2018-12-11 17:15:04 +01:00
lb_chash.h MINOR: backend: move hash_balance_factor out of chash 2019-01-14 19:33:17 +01:00
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fwrr.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_map.h MEDIUM: threads/lb: Make LB algorithms (lb_*.c) thread-safe 2017-10-31 13:58:31 +01:00
listener.h MEDIUM: ssl/cli: 'set ssl cert' updates a certificate from the CLI 2019-10-11 17:32:03 +02:00
log.h BUG/MINOR: log: make "show startup-log" use a ring buffer instead 2019-11-15 15:50:16 +01:00
mailers.h MINOR: mailers: make it possible to configure the connection timeout 2016-02-20 15:33:06 +01:00
map.h CLEANUP: map: it seems that the map were planed to be chained 2016-03-30 15:41:15 +02:00
obj_type.h MINOR: obj_type: new object type for struct stream 2019-04-23 11:35:56 +02:00
pattern.h MINOR: threads: Use __decl_hathreads to declare locks 2017-11-13 11:38:17 +01:00
peers.h MINOR: peers: Add debugging information to "show peers". 2019-11-19 14:48:28 +01:00
pipe.h [MEDIUM] introduce pipe pools 2009-01-25 13:49:53 +01:00
port_range.h BUG/MEDIUM: port_range: Make the ring buffer lock-free. 2019-04-30 15:10:17 +02:00
proto_udp.h MEDIUM: protocol: add minimalist UDP protocol client 2015-06-13 22:07:35 +02:00
protocol_buffers.h MINOR: sample: Rework gRPC converter code. 2019-03-05 11:04:23 +01:00
protocol.h BUG/MEDIUM: protocols: add a global lock for the init/deinit stuff 2019-07-24 16:45:02 +02:00
proxy.h MEDIUM: list: Separate "locked" list from regular list. 2019-09-23 18:16:08 +02:00
queue.h MINOR: queue: replace the linked list with a tree 2018-08-10 15:06:27 +02:00
ring.h MEDIUM: ring: implement a wait mode for watchers 2019-08-30 11:58:58 +02:00
sample.h MAJOR: http: Remove the HTTP legacy code 2019-07-19 09:24:12 +02:00
server.h MEDIUM: list: Separate "locked" list from regular list. 2019-09-23 18:16:08 +02:00
session.h MEDIUM: sessions: Introduce session flags. 2019-05-29 15:41:47 +02:00
shctx.h MINOR: shctx: Change max. object size type to unsigned int. 2018-10-26 04:54:40 +02:00
signal.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
sink.h MINOR: sink: now report the number of dropped events on output 2019-08-27 17:14:19 +02:00
spoe.h MINOR: spoe: Support the async mode with several threads 2019-09-26 16:51:02 +02:00
ssl_sock.h MINOR: ssl/cli: replace the default_ctx during 'commit ssl cert' 2019-11-04 18:16:53 +01:00
stats.h MINOR: stats: Report max times in addition of the averages for sessions 2019-11-15 14:23:54 +01:00
stick_table.h MINOR: stick-table: Add "server_name" new data type. 2019-06-05 08:33:35 +02:00
stream_interface.h MEDIUM: stream-int: introduce a new state SI_ST_RDY 2019-06-06 16:36:19 +02:00
stream.h BUG/MEDIUM: proxy: Make sure to destroy the stream on upgrade from TCP to H2 2019-08-02 18:28:58 +02:00
task.h BUG/MAJOR: task: add a new TASK_SHARED_WQ flag to fix foreing requeuing 2019-12-19 14:42:22 +01:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
trace.h MINOR: trace: change the detail_level to per-source verbosity 2019-08-29 17:11:25 +02:00
vars.h MINOR: threads: Use __decl_hathreads to declare locks 2017-11-13 11:38:17 +01:00