CLEANUP: fd: finally get rid of fd_done_recv()
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 18:08:55 +0000 (20:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
commit0138f51f933d8268677f4ea09adb971b83a45e7d
tree14eb842809d0e14c4a2649430fa6bb20ce3f850c
parente53e7ec9d9c2444954112891c2816c88a7897ebe
CLEANUP: fd: finally get rid of fd_done_recv()

fd_done_recv() used to be useful with the FD cache because it used to
allow to keep a file descriptor active in the poller without being
marked as ready in the cache, saving it from ringing immediately,
without incurring any system call. It was a way to make it yield
to wait for new events leaving a bit of time for others. The only
user left was the connection accepter (listen_accept()). We used
to suspect that with the FD cache removal it had become totally
useless since changing its readiness or not wouldn't change its
status regarding the poller itself, which would be the only one
deciding to report it again.

Careful tests showed that it indeed has exactly zero effect nowadays,
the syscall numbers are exactly the same with and without, including
when enabling edge-triggered polling.

Given that there's no more API available to manipulate it and that it
was directly called as an optimization from listener_accept(), it's
about time to remove it.
doc/internals/polling-states.fig
include/haproxy/fd.h
src/listener.c