]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: pollers: Use a global list for fd shared between threads.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Apr 2018 14:58:25 +0000 (16:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 6 May 2018 04:27:09 +0000 (06:27 +0200)
commit6b96f7289c2f401deef4bdc6e20792360807dde4
treee1c5ab269d7f57cbd5d4b1bc623d1edbab6c4990
parent6a2cf8752c160d263aa57ef97e708d633ff865e6
BUG/MEDIUM: pollers: Use a global list for fd shared between threads.

With the old model, any fd shared by multiple threads, such as listeners
or dns sockets, would only be updated on one threads, so that could lead
to missed event, or spurious wakeups.
To avoid this, add a global list for fd that are shared, using the same
implementation as the fd cache, and only remove entries from this list
when every thread as updated its poller.

[wt: this will need to be backported to 1.8 but differently so this patch
 must not be backported as-is]
include/common/hathreads.h
include/proto/fd.h
include/types/fd.h
src/ev_epoll.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/fd.c
src/hathreads.c