mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-15 05:30:49 -04:00
Offloaded work used two different mechanisms: a per-loop isc_helper
thread for CPU-bound crypto (DNSSEC validation, message signature
checks) and the process-global libuv thread pool for blocking I/O (zone
load and dump, inbound transfer apply). Neither could cancel a queued
task, and the two disagreed about exclusive mode — the helper paused
with its loop under isc_loopmgr_pause() but the libuv pool did not, so
blocking offloaded work kept running while a loop held the exclusive
lock.
Unify both behind isc_work: each loop gets its own worker thread per
lane — FAST for short, bounded tasks and SLOW for long, blocking ones —
fed by a private queue. Separate lanes keep a short crypto task off the
path of a multi-second zone dump once both run on per-loop workers;
every lane parks with isc_loopmgr_pause() so exclusive mode now quiesces
offloaded work too; and a still-queued task can be canceled before it
starts (isc_work_cancel). isc_helper is removed and its callers select a
lane.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| include | ||
| netmgr | ||
| .gitignore | ||
| ascii.c | ||
| assertions.c | ||
| async.c | ||
| async_p.h | ||
| backtrace.c | ||
| base32.c | ||
| base64.c | ||
| commandline.c | ||
| condition.c | ||
| counter.c | ||
| crc64.c | ||
| dir.c | ||
| errno.c | ||
| errno2result.c | ||
| errno2result.h | ||
| error.c | ||
| file.c | ||
| fips.c | ||
| getaddresses.c | ||
| hash.c | ||
| hashmap.c | ||
| heap.c | ||
| hex.c | ||
| histo.c | ||
| hmac.c | ||
| ht.c | ||
| httpd.c | ||
| interfaceiter.c | ||
| iterated_hash.c | ||
| jemalloc_shim.h | ||
| job.c | ||
| job_p.h | ||
| lex.c | ||
| lib.c | ||
| log.c | ||
| loop.c | ||
| loop_p.h | ||
| Makefile.am | ||
| managers.c | ||
| md.c | ||
| mem.c | ||
| mem_p.h | ||
| meminfo.c | ||
| mutex.c | ||
| mutex_p.h | ||
| mutexblock.c | ||
| net.c | ||
| netaddr.c | ||
| netscope.c | ||
| openssl_shim.c | ||
| openssl_shim.h | ||
| os.c | ||
| os_p.h | ||
| parseint.c | ||
| picohttpparser.c | ||
| picohttpparser.h | ||
| portset.c | ||
| probes.d | ||
| proxy2.c | ||
| quota.c | ||
| radix.c | ||
| random.c | ||
| ratelimiter.c | ||
| regex.c | ||
| region.c | ||
| result.c | ||
| rwlock.c | ||
| safe.c | ||
| serial.c | ||
| signal.c | ||
| sockaddr.c | ||
| stats.c | ||
| stdio.c | ||
| stdtime.c | ||
| string.c | ||
| symtab.c | ||
| syslog.c | ||
| tests | ||
| thread.c | ||
| tid.c | ||
| time.c | ||
| timer.c | ||
| tls.c | ||
| tm.c | ||
| url.c | ||
| utf8.c | ||
| uv.c | ||
| work.c | ||
| xml.c | ||