]> 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 22:27:28 +0000 (23:27 +0100)
commita9f4e3369a4452d5d13228509bed85cd19001715
treef9f8bc41a8a092fee4fddafcb9bc4cbd65b2c1a0
parentb5cce0f5972dc84457bff8d0c141a68e8c17ff61
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.

(cherry picked from commit c602d76c1fb6cfe54da9094ae1d12912d852d359)
lib/dns/qpcache.c
lib/isc/include/isc/queue.h