From: Willy Tarreau Date: Sat, 10 Apr 2021 15:09:53 +0000 (+0200) Subject: MINOR: kqueue: move kqueue_fd to read_mostly X-Git-Tag: v2.4-dev17~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8209c9aa18845e7e2f8aadeff281496d09f9ff36;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index ee6b8c22f0..e9ca1ba1b1 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