From b6a2f5899361c0de45048b2d7b7104ad2a27f16b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 26 Nov 2017 11:08:14 +0100 Subject: [PATCH] MINOR: buffers: cache-align buffer_wq_lock This lock is highly stressed, avoid cache-line sharing to limit stress. --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index 4e726b09a..167b75ae7 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.