haproxy/doc/internals/polling-states.fig
Willy Tarreau 0138f51f93 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.
2020-10-15 21:47:56 +02:00

60 lines
2.2 KiB
Plaintext

#FIG 3.2 Produced by xfig version 3.2.7b
Portrait
Center
Metric
A4
100.00
Single
-2
1200 2
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1125 1350 1125 1800
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1125 2250 1125 2700
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1125 3150 1125 3600
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1575 1800 1575 1350
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1575 3600 1575 3150
2 4 0 1 0 7 51 -1 20 0.000 0 0 7 0 0 5
1800 1350 900 1350 900 900 1800 900 1800 1350
2 4 0 1 0 7 51 -1 20 0.000 0 0 7 0 0 5
1800 2250 900 2250 900 1800 1800 1800 1800 2250
2 4 0 1 0 7 51 -1 20 0.000 0 0 7 0 0 5
1800 4050 900 4050 900 3600 1800 3600 1800 4050
2 4 0 1 0 7 51 -1 20 0.000 0 0 7 0 0 5
1800 3150 900 3150 900 2700 1800 2700 1800 3150
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1350 450 1350 900
2 1 0 1 0 7 50 -1 -1 0.000 1 0 -1 1 0 2
1 1 1.00 90.00 180.00
1575 2700 1575 2250
4 2 0 50 -1 16 8 0.0000 4 105 270 1080 1485 want\001
4 2 0 50 -1 16 8 0.0000 4 120 255 1035 3285 stop\001
4 0 0 50 -1 16 8 0.0000 4 105 270 1665 3510 want\001
4 1 0 50 -1 16 10 0.0000 4 120 735 1350 1080 STOPPED\001
4 1 0 50 -1 16 10 0.0000 4 120 795 1350 3780 DISABLED\001
4 1 0 50 -1 16 10 0.0000 4 120 555 1350 2880 ACTIVE\001
4 1 0 50 -1 16 10 0.0000 4 120 540 1350 1980 READY\001
4 0 0 50 -1 16 8 0.0000 4 90 210 1665 2565 may\001
4 2 0 50 -1 16 8 0.0000 4 105 240 1035 2430 cant\001
4 1 0 50 -1 16 8 0.0000 4 120 240 1350 1260 R,!A\001
4 1 0 50 -1 16 8 0.0000 4 120 210 1350 2160 R,A\001
4 1 0 50 -1 16 8 0.0000 4 120 240 1350 3060 !R,A\001
4 1 0 50 -1 16 8 0.0000 4 120 270 1350 3960 !R,!A\001
4 0 0 50 -1 16 8 0.0000 4 120 255 1665 1710 stop\001
4 0 0 50 -1 16 10 0.0000 4 150 855 2520 1125 R=ready flag\001
4 0 0 50 -1 16 10 0.0000 4 150 885 2520 1290 A=active flag\001
4 0 0 50 -1 16 10 0.0000 4 150 1365 2520 2475 fd_want sets A flag\001
4 0 0 50 -1 16 10 0.0000 4 150 1440 2520 2640 fd_stop clears A flag\001
4 0 0 50 -1 16 10 0.0000 4 150 1905 2520 3300 update() updates the poller.\001
4 0 0 50 -1 16 10 0.0000 4 150 2190 2520 2970 fd_cant clears R flag (EAGAIN)\001
4 0 0 50 -1 16 10 0.0000 4 150 2115 2520 3135 fd_rdy sets R flag (poll return)\001