]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: kqueue: move kqueue_fd to read_mostly
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 15:09:53 +0000 (17:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 17:27:41 +0000 (19:27 +0200)
This one only contains the list of per-thread kqueue FDs, and is used
a lot during updates. Let's mark it read_mostly to avoid false sharing
of FDs placed at the extremities.

src/ev_kqueue.c

index ee6b8c22f0145a36574d9dfbcb539043c42ef342..e9ca1ba1b19d3bcf1f4c8332a038cb781d286a91 100644 (file)
@@ -27,7 +27,7 @@
 
 
 /* private data */
-static int kqueue_fd[MAX_THREADS]; // per-thread kqueue_fd
+static int kqueue_fd[MAX_THREADS] __read_mostly; // per-thread kqueue_fd
 static THREAD_LOCAL struct kevent *kev = NULL;
 static struct kevent *kev_out = NULL; // Trash buffer for kevent() to write the eventlist in