]> git.ipfire.org Git - thirdparty/bind9.git/commit
Replace lock keyfile hashmap with lock pool
authorAlessio Podda <alessio@isc.org>
Fri, 27 Feb 2026 12:33:55 +0000 (13:33 +0100)
committerAlessio Podda <alessio@isc.org>
Fri, 6 Mar 2026 11:31:24 +0000 (12:31 +0100)
commit547c2800023ea016e8c67f44fbf64e8115894edd
tree3b6acdcbab84f6070b1ee71ac5a16f2f6e26b1b0
parentc188270377e0a31e3e7f95cc6438a376c5e58461
Replace lock keyfile hashmap with lock pool

Kasp used a lock per zone origin in order to prevent concurrent access
to keyfiles. This lead to substantial memory consumption in the case of
authoritative servers with many small zones, as lots of locks need to be
allocated.

Since the number of keyfile locks taken cannot exceed the number of
helper threads, it makes more sense to use a lock pool of fixed size
keyed by the hash of the origin name, leading to memory savings.
lib/dns/lib.c
lib/dns/zone.c
lib/dns/zone_p.h