]> git.kaiwu.me - haproxy.git/commit
MEDIUM: fd: Make it possible to have one fdtab per thread-group
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 29 Jun 2026 12:32:19 +0000 (14:32 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 30 Jul 2026 11:35:22 +0000 (13:35 +0200)
commitdefc3d1f0527ebce5b563bbb37f884ffcc9c96f5
tree44397a401b41abcab4377db47fbc6e3f16a0893b
parent02b7685013d8abe8ba28a4621217591652d60157
MEDIUM: fd: Make it possible to have one fdtab per thread-group

Add a new global flag, GTUNE_NO_TG_FD_SHARING. When set, the goal is to
have to a different file descriptor table for each thread group, if
the platform supports separate file descriptor tables for each thread
(so right now, only linux with the unshare() syscall), as with many
threads, the kernel lock for the file descriptor table is a huge source
of contention.
This commit just makes it so if the flag is set, we will have one fdtab
per thread group, and we will call unshare() for each thread group, so
that each has its own file descriptor table.
Note that for now there is no way to set the flag, as a lot more work is
needed before the feature is usable. As such, this commit should have no
noticeable impact.
include/haproxy/fd.h
include/haproxy/global-t.h
include/haproxy/tinfo-t.h
src/fd.c
src/haproxy.c
src/thread.c