From 8209c9aa18845e7e2f8aadeff281496d09f9ff36 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 10 Apr 2021 17:09:53 +0200 Subject: [PATCH] MINOR: kqueue: move kqueue_fd to read_mostly 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index ee6b8c22f..e9ca1ba1b 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -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