[RFC PATCH v3 7/7] futex: use hq-spinlock for hash buckets
Fedorov Nikita
fedorov.nikita at h-partners.com
Wed Apr 15 09:44:59 PDT 2026
Example of hq-spinlock enabled for futex hash-table bucket locks
(used in memcached testing scenario)
In the evaluated memcached workloads, this improved throughput by up to
10% on AMD EPYC 9654 and by up to 8% on Kunpeng 920, with corresponding
latency reductions.
Co-developed-by: Anatoly Stepanov <stepanov.anatoly at huawei.com>
Signed-off-by: Anatoly Stepanov <stepanov.anatoly at huawei.com>
Co-developed-by: Nikita Fedorov <fedorov.nikita at h-partners.com>
Signed-off-by: Nikita Fedorov <fedorov.nikita at h-partners.com>
---
kernel/futex/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 31e83a0978..042cdc7f75 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1521,7 +1521,7 @@ static void futex_hash_bucket_init(struct futex_hash_bucket *fhb,
#endif
atomic_set(&fhb->waiters, 0);
plist_head_init(&fhb->chain);
- spin_lock_init(&fhb->lock);
+ spin_lock_init_hq(&fhb->lock);
}
#define FH_CUSTOM 0x01
--
2.34.1
More information about the linux-arm-kernel
mailing list