From: Willy Tarreau Date: Sat, 10 Apr 2021 15:06:40 +0000 (+0200) Subject: MINOR: epoll: move epoll_fd to read_mostly X-Git-Tag: v2.4-dev17~157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26d212c7442e93ca58f3fa75eab16141970a0729;p=thirdparty%2Fhaproxy.git MINOR: epoll: move epoll_fd to read_mostly This one only contains the list of per-thread epoll FDs, and is used a lot during updates. Let's mark it read_mostly to avoid false sharing of FDs placed at the extremities. --- diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 506805f891..330c38c449 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -26,7 +26,7 @@ /* private data */ static THREAD_LOCAL struct epoll_event *epoll_events = NULL; -static int epoll_fd[MAX_THREADS]; // per-thread epoll_fd +static int epoll_fd[MAX_THREADS] __read_mostly; // per-thread epoll_fd #ifndef EPOLLRDHUP /* EPOLLRDHUP was defined late in libc, and it appeared in kernel 2.6.17 */