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 <[email protected]> Signed-off-by: Anatoly Stepanov <[email protected]> Co-developed-by: Nikita Fedorov <[email protected]> Signed-off-by: Nikita Fedorov <[email protected]> --- 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

