]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: epoll: epoll_events should be allocated according to global.tune.maxpollevents
authorGodbach <nylzhaowei@gmail.com>
Wed, 17 Dec 2014 08:14:26 +0000 (16:14 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Dec 2014 16:04:53 +0000 (17:04 +0100)
commitd39ae7ddc9e32f14b95ab18392e2ca49bceaee22
treec9a80e0853579ec7b9b9c4c6b375b83d08c685f1
parentbd556bf35c33d3088b6d43d13b93515ed70a9243
CLEANUP: epoll: epoll_events should be allocated according to global.tune.maxpollevents

Willy: commit f2e8ee2b introduced an optimization in the old speculative epoll
code, which implemented its own event cache. It was needed to store that many
events (it was bound to maxsock/4 btw). Now the event cache lives on its own
and we don't need this anymore. And since events are allocated on the kernel
side, we only need to allocate the events we want to return.

As a result, absmaxevents will be not used anymore. Just remove the definition
and the comment of it, replace it with global.tune.maxpollevents. It is also an
optimization of memory usage for large amounts of sockets.

Signed-off-by: Godbach <nylzhaowei@gmail.com>
src/ev_epoll.c