bind9/lib/isc
Ondřej Surý cd348cf255
Replace the shared work pool with per-loop, per-lane worker threads
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 a5f13b3410)
2026-06-17 21:15:17 +02:00
..
include Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
netmgr Guard against a detached stream in isc__nm_http_request() error path 2026-06-16 15:20:56 +02:00
.gitignore
ascii.c
assertions.c
async.c
async_p.h
backtrace.c
base32.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
base64.c Add enum for use with isc_base64_tobuffer and isc_hex_tobuffer 2026-01-28 08:02:00 +11:00
commandline.c
condition.c
counter.c
crc64.c
dir.c
errno.c
errno2result.c
errno2result.h
error.c
file.c Use const pointer with strchr of const pointer 2026-01-20 06:00:50 +00:00
fips.c
getaddresses.c
hash.c Use arc4random for CSPRNG when available 2025-10-02 13:49:33 +02:00
hashmap.c Use arc4random for CSPRNG when available 2025-10-02 13:49:33 +02:00
heap.c
hex.c Add enum for use with isc_base64_tobuffer and isc_hex_tobuffer 2026-01-28 08:02:00 +11:00
histo.c Fix spelling typos in comments and code 2026-06-01 15:04:31 +00:00
hmac.c
ht.c Fix spelling typos in comments and code 2026-06-01 15:04:31 +00:00
httpd.c Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
interfaceiter.c
iterated_hash.c
jemalloc_shim.h Provide more information when the memory allocation fails 2025-11-28 16:45:08 +01:00
job.c
job_p.h
lex.c
lib.c
log.c
loop.c Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
loop_p.h Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
Makefile.am Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
managers.c
md.c
mem.c Make isc_mem_isovermem() probabilistic 2026-05-07 13:09:18 +02:00
mem_p.h
meminfo.c
mutex.c
mutex_p.h
mutexblock.c
net.c Rename isc_net_getudpportrange() to isc_net_getportrange() 2026-02-20 17:02:45 +01:00
netaddr.c
netscope.c
openssl_shim.c Fix compatibility with OpenSSL 1.0.2u 2026-06-12 23:05:13 +00:00
openssl_shim.h
os.c Implement IP_LOCAL_PORT_RANGE socket option for Linux 2026-02-20 17:02:45 +01:00
os_p.h
parseint.c
picohttpparser.c Fix spelling typos in comments and code 2026-06-01 15:04:31 +00:00
picohttpparser.h
portset.c
probes.d
proxy2.c
quota.c
radix.c Fix INSIST copy-paste error checking RADIX_V4 instead of RADIX_V6 2026-03-30 19:01:29 +02:00
random.c Drop the unit test for testing randomness 2025-11-04 20:51:22 +01:00
ratelimiter.c Dispatch ratelimiter events under the lock 2026-04-30 10:53:49 +02:00
regex.c
region.c
result.c Switch UDP fetches to TCP on the first response with a wrong query id 2026-05-15 08:49:19 +02:00
rwlock.c Use sequentially consistent ordering in the adaptive rwlock handshake 2026-06-08 15:56:13 +00:00
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 Only update the global tid_count once 2026-06-04 12:50:57 +02:00
time.c
timer.c
tls.c Fix compatibility with OpenSSL 1.0.2u 2026-06-12 23:05:13 +00:00
tm.c
url.c
utf8.c
uv.c ensure file descriptors 0-2 are in use before using libuv 2025-08-28 08:57:12 +00:00
work.c Replace the shared work pool with per-loop, per-lane worker threads 2026-06-17 21:15:17 +02:00
xml.c