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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user