2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

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
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 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. * 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); isc_mem_create("ADB", &mctx);
dns_adb_create(mctx, view, &view->adb); dns_adb_create(mctx, loopmgr, view, &view->adb);
isc_mem_detach(&mctx); isc_mem_detach(&mctx);
result = dns_requestmgr_create(view->mctx, loopmgr, view->dispatchmgr, result = dns_requestmgr_create(view->mctx, loopmgr, view->dispatchmgr,