Use cds_lfht for lock-free hashtables in dns_adb

Replace the read-write locked isc_hashmap with lock-free cds_lfht
hashtable and replace the singular LRU tables for ADB names and entries
with a per-thread LRU tables.  These changes allowed to remove all the
read-write locking on the names and entries tables.
This commit is contained in:
Ondřej Surý 2025-06-25 19:02:37 +02:00
parent cca4b26d31
commit cdeb8d1c14
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41
3 changed files with 390 additions and 327 deletions

File diff suppressed because it is too large Load diff

View file

@ -235,7 +235,8 @@ struct dns_adbaddrinfo {
****/
void
dns_adb_create(isc_mem_t *mem, dns_view_t *view, dns_adb_t **newadb);
dns_adb_create(isc_mem_t *mem, isc_loopmgr_t *loopmgr, dns_view_t *view,
dns_adb_t **newadb);
/*%<
* Create a new ADB.
*

View file

@ -550,7 +550,7 @@ dns_view_createresolver(dns_view_t *view, isc_nm_t *netmgr,
}
isc_mem_create("ADB", &mctx);
dns_adb_create(mctx, view, &view->adb);
dns_adb_create(mctx, loopmgr, view, &view->adb);
isc_mem_detach(&mctx);
result = dns_requestmgr_create(view->mctx, loopmgr, view->dispatchmgr,