From: Willy Tarreau Date: Sun, 26 Nov 2017 10:08:14 +0000 (+0100) Subject: MINOR: buffers: cache-align buffer_wq_lock X-Git-Tag: v1.8.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6a2f5899361c0de45048b2d7b7104ad2a27f16b;p=thirdparty%2Fhaproxy.git MINOR: buffers: cache-align buffer_wq_lock This lock is highly stressed, avoid cache-line sharing to limit stress. --- diff --git a/src/buffer.c b/src/buffer.c index 4e726b09a0..167b75ae7d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -33,7 +33,7 @@ struct buffer buf_wanted = { .p = buf_wanted.data }; /* list of objects waiting for at least one buffer */ struct list buffer_wq = LIST_HEAD_INIT(buffer_wq); -__decl_hathreads(HA_SPINLOCK_T buffer_wq_lock); +__decl_hathreads(HA_SPINLOCK_T __attribute__((aligned(64))) buffer_wq_lock); /* this buffer is always the same size as standard buffers and is used for * swapping data inside a buffer.