mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
MINOR: poller: move the call of tv_update_date() back to the pollers
The reason behind this will be to be able to compute a timeout when busy polling.
This commit is contained in:
parent
744a08903e
commit
48f8bc1368
@ -586,7 +586,6 @@ static inline void tv_entering_poll()
|
||||
*/
|
||||
static inline void tv_leaving_poll(int timeout, int interrupted)
|
||||
{
|
||||
tv_update_date(timeout, interrupted);
|
||||
measure_idle();
|
||||
prev_cpu_time = now_cpu_time();
|
||||
prev_mono_time = now_mono_time();
|
||||
|
||||
@ -150,6 +150,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
||||
tv_entering_poll();
|
||||
activity_count_runtime();
|
||||
status = epoll_wait(epoll_fd[tid], epoll_events, global.tune.maxpollevents, wait_time);
|
||||
tv_update_date(wait_time, status);
|
||||
tv_leaving_poll(wait_time, status);
|
||||
|
||||
thread_harmless_end();
|
||||
|
||||
@ -143,6 +143,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
||||
kev, // struct kevent *eventlist
|
||||
fd, // int nevents
|
||||
&timeout); // const struct timespec *timeout
|
||||
tv_update_date(delta_ms, status);
|
||||
tv_leaving_poll(delta_ms, status);
|
||||
|
||||
thread_harmless_end();
|
||||
|
||||
@ -198,6 +198,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
||||
tv_entering_poll();
|
||||
activity_count_runtime();
|
||||
status = poll(poll_events, nbfd, wait_time);
|
||||
tv_update_date(wait_time, status);
|
||||
tv_leaving_poll(wait_time, status);
|
||||
|
||||
thread_harmless_end();
|
||||
|
||||
@ -172,6 +172,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
||||
writenotnull ? tmp_evts[DIR_WR] : NULL,
|
||||
NULL,
|
||||
&delta);
|
||||
tv_update_date(delta_ms, status);
|
||||
tv_leaving_poll(delta_ms, status);
|
||||
|
||||
thread_harmless_end();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user