]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: poller: separate the wait time from the wake events
authorWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 14:44:05 +0000 (16:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 15:25:21 +0000 (17:25 +0200)
commit2ae84e445da0a1a390ed8a569752a42e391686db
treea83e8bd3266400fbd1997d9d0f7e05f8ffdb94e6
parentd78d08f95b8de5f485eb3aa8304f8e207adbe7db
MEDIUM: poller: separate the wait time from the wake events

We have been abusing the do_poll()'s timeout for a while, making it zero
whenever there is some known activity. The problem this poses is that it
complicates activity diagnostic by incrementing the poll_exp field for
each known activity. It also requires extra computations that could be
avoided.

This change passes a "wake" argument to say that the poller must not
sleep. This simplifies the operations and allows one to differenciate
expirations from activity.
include/types/fd.h
src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/haproxy.c