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

Always use the number of CPUS for resolver->ntasks

Since the fctx hash table is now self-resizing, and resolver tasks are
selected to match the thread that created the fetch context, there
shouldn't be any significant advantage to having multiple tasks per CPU;
a single task per thread should be sufficient.

Additionally, the fetch context is always pinned to the calling netmgr
thread to minimize the contention just to coalesced fetches - if two
threads starts the same fetch, it will be pinned to the first one to get
the bucket.
This commit is contained in:
Evan Hunt
2022-05-07 20:58:19 -07:00
committed by Ondřej Surý
parent 857f3bede3
commit 6936db2f59
9 changed files with 57 additions and 62 deletions

View File

@@ -81,7 +81,7 @@ static void
mkres(dns_resolver_t **resolverp) {
isc_result_t result;
result = dns_resolver_create(view, taskmgr, 1, 1, netmgr, timermgr, 0,
result = dns_resolver_create(view, taskmgr, 1, netmgr, timermgr, 0,
dispatchmgr, dispatch, NULL, resolverp);
assert_int_equal(result, ISC_R_SUCCESS);
}