]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: epoll/threads: only call epoll_ctl(DEL) on polled FDs
authorWilly Tarreau <w@1wt.eu>
Wed, 31 Jan 2018 08:49:29 +0000 (09:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 31 Jan 2018 08:49:29 +0000 (09:49 +0100)
commit497959290789002b814b9021a737a3c5f14e7407
treee3ad5e4934ac3ee8539bf2af5eba457e34f295fc
parent6778b27542d4c8f59e5fdb7df737848f03ef1788
BUG/MINOR: epoll/threads: only call epoll_ctl(DEL) on polled FDs

Commit d9e7e36 ("BUG/MEDIUM: epoll/threads: use one epoll_fd per thread")
addressed an issue with the polling and required that cloned FDs are removed
from all polling threads on close. But in fact it does it for all bound
threads, some of which may not necessarily poll the FD. This is harmless,
but it may also make it harder later to deal with FD migration between
threads. Better use polled_mask which only reports threads still aware
of the FD instead of thread_mask.

This fix should be backported to 1.8.
src/ev_epoll.c