BUG/MINOR: pollers: always program an update for migrated FDs
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Jul 2021 12:18:49 +0000 (14:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Aug 2021 15:00:52 +0000 (17:00 +0200)
commitbc54716f94c1b8cde916886e6bffb536ad96036c
tree36d159c36b5b5db7cb922fdeb909afee447c71a2
parentb7d186d893c0fd0ef18bac9aa0a0907b23cbe415
BUG/MINOR: pollers: always program an update for migrated FDs

If an MT-aware poller reports that a file descriptor was migrated, it
must stop reporting it. The simplest way to do this is to program an
update if not done yet. This will automatically mark the FD for update
on next round. Otherwise there's a risk that some events are reported
a bit too often and cause extra CPU usage with these pollers. Note
that epoll is currently OK regarding this. Select does not need this
because it uses a single shared events table, so in case of migration
no FD change is expected.

This should be backported as far as 2.2.

(cherry picked from commit 79e90b96158911535c22d1676f7ab8a0e3a9f7af)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit ea2036d40f103b6443d22224abbd6460e0e5401f)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c