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

Make dns_dispatch bound to threads

Instead of high number of dispatches (4 * named_g_udpdisp)[1], make the
dispatches bound to threads and make dns_dispatchset_t create a dispatch
for each thread (event loop).

This required couple of other changes:

1. The dns_dispatch_createudp() must be called on loop, so the isc_tid()
   is already initialized - changes to nsupdate and mdig were required.

2. The dns_requestmgr had only a single dispatch per v4 and v6.  Instead
   of using single dispatch, use dns_dispatchset_t for each protocol -
   this is same as dns_resolver.
This commit is contained in:
Ondřej Surý
2023-09-15 11:36:28 +02:00
parent 282c4709b8
commit 6fd06c461b
19 changed files with 132 additions and 208 deletions

View File

@@ -589,8 +589,8 @@ dns_view_weakdetach(dns_view_t **viewp) {
isc_result_t
dns_view_createresolver(dns_view_t *view, isc_loopmgr_t *loopmgr,
unsigned int ndisp, isc_nm_t *netmgr,
unsigned int options, isc_tlsctx_cache_t *tlsctx_cache,
isc_nm_t *netmgr, unsigned int options,
isc_tlsctx_cache_t *tlsctx_cache,
dns_dispatch_t *dispatchv4,
dns_dispatch_t *dispatchv6) {
isc_result_t result;
@@ -601,7 +601,7 @@ dns_view_createresolver(dns_view_t *view, isc_loopmgr_t *loopmgr,
REQUIRE(view->resolver == NULL);
REQUIRE(view->dispatchmgr != NULL);
result = dns_resolver_create(view, loopmgr, ndisp, netmgr, options,
result = dns_resolver_create(view, loopmgr, netmgr, options,
tlsctx_cache, dispatchv4, dispatchv6,
&view->resolver);
if (result != ISC_R_SUCCESS) {