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
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
backend.h
capture.h
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
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
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
lb_chash.h
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
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
map.h
obj_type.h
pattern.h
peers.h MINOR: peers: Add debugging information to "show peers". 2019-11-19 14:48:28 +01:00
pipe.h
port_range.h
proto_udp.h
protocol.h BUG/MEDIUM: protocols: add a global lock for the init/deinit stuff 2019-07-24 16:45:02 +02:00
protocol_buffers.h
proxy.h MEDIUM: list: Separate "locked" list from regular list. 2019-09-23 18:16:08 +02:00
queue.h
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
signal.h
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.h BUG/MEDIUM: proxy: Make sure to destroy the stream on upgrade from TCP to H2 2019-08-02 18:28:58 +02:00
stream_interface.h MEDIUM: stream-int: introduce a new state SI_ST_RDY 2019-06-06 16:36:19 +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
trace.h MINOR: trace: change the detail_level to per-source verbosity 2019-08-29 17:11:25 +02:00
vars.h