]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: fd: make sure to mark the thread as not stuck in fd_update_events()
authorWilly Tarreau <w@1wt.eu>
Fri, 16 Aug 2019 14:06:14 +0000 (16:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 Aug 2019 14:06:14 +0000 (16:06 +0200)
commitf5cab82025097a43e50d2b643fd7a2e3c49f97a9
tree59bb4ed6fb79c63062689ba9284bf121ecff3627
parentbd9e842866ac759418a5f9e8832d2806eeb00bd8
MINOR: fd: make sure to mark the thread as not stuck in fd_update_events()

When I/O events are being processed, we want to make sure to mark the
thread as not stuck. The reason is that some pollers (like poll()) which
do not limit the number of FDs they report could possibly report a huge
amount of FD all having to perform moderately expensive operations in
the I/O callback (e.g. via mux-pt which forwards to the upper layers),
making the watchdog think the thread is stuck since it does not schedule.
Of course this must never happen but if it ever does we must be liberal
about it.

This should be backported to 2.0, where the situation may happen more
easily due to the FD cache which can start to collect a large amount of
events. It may be related to the report in issue #201 though nothing is
certain about it.
include/proto/fd.h