mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +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:
@@ -4033,7 +4033,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
||||
named_cache_t *nsc;
|
||||
bool zero_no_soattl;
|
||||
dns_acl_t *clients = NULL, *mapped = NULL, *excluded = NULL;
|
||||
unsigned int query_timeout, ndisp;
|
||||
unsigned int query_timeout;
|
||||
bool old_rpz_ok = false;
|
||||
dns_dyndbctx_t *dctx = NULL;
|
||||
unsigned int resolver_param;
|
||||
@@ -4685,9 +4685,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ndisp = 4 * ISC_MIN(named_g_udpdisp, MAX_UDP_DISPATCH);
|
||||
CHECK(dns_view_createresolver(
|
||||
view, named_g_loopmgr, ndisp, named_g_netmgr, resopts,
|
||||
view, named_g_loopmgr, named_g_netmgr, resopts,
|
||||
named_g_server->tlsctx_client_cache, dispatch4, dispatch6));
|
||||
|
||||
if (resstats == NULL) {
|
||||
@@ -12148,10 +12147,6 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
snprintf(line, sizeof(line), "worker threads: %u\n", named_g_cpus);
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
snprintf(line, sizeof(line), "UDP listeners per interface: %u\n",
|
||||
named_g_udpdisp);
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
snprintf(line, sizeof(line), "number of zones: %u (%u automatic)\n",
|
||||
zonecount, automatic);
|
||||
CHECK(putstr(text, line));
|
||||
|
Reference in New Issue
Block a user