]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: polling: start to move maxfd computation to the pollers
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Jan 2018 20:48:23 +0000 (21:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 14:22:57 +0000 (15:22 +0100)
commit173d9951e2bc47eee41ba794458a1ae9108f1ec3
tree2ec2f12f2a1c3f11a7a11a0c527976cdf589f76b
parentc5532acb4de1f3cce4138572c11ffa5d78339193
MEDIUM: polling: start to move maxfd computation to the pollers

Since only select() and poll() still make use of maxfd, let's move
its computation right there in the pollers themselves, and only
during each fd update pass. The computation doesn't need a lock
anymore, only a few atomic ops. It will be accurate, be done much
less often and will not be required anymore in the FD's fast patch.

This provides a small performance increase of about 1% in connection
rate when using epoll since we get rid of this computation which was
performed under a lock.
include/proto/fd.h
include/types/fd.h
src/ev_poll.c
src/ev_select.c
src/fd.c
src/haproxy.c