]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reduce false sharing in dns_qpcache
authorOndřej Surý <ondrej@isc.org>
Mon, 3 Feb 2025 12:36:27 +0000 (13:36 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 4 Feb 2025 20:37:46 +0000 (21:37 +0100)
commitc602d76c1fb6cfe54da9094ae1d12912d852d359
treeabd3447812f484a41274c3d3e833b0875a54230b
parenta1ca49683aa59eec3d0e7129d712e95645e60cf9
Reduce false sharing in dns_qpcache

Instead of having many node_lock_count * sizeof(<member>) arrays, pack
all the members into a qpcache_bucket_t struct that is cacheline aligned
and have a single array of those.

Additionaly, make both the head and the tail of isc_queue_t padded, not
just the head, to prevent false sharing of the lock-free structure with
the lock that follows it.
lib/dns/qpcache.c
lib/isc/include/isc/queue.h