mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-24 10:21:10 -05:00
This "quiescent state based reclamation" module provides support for
the qp-trie module in dns/qp. It is a replacement for liburcu, written
without reference to the urcu source code, and in fact it works in a
significantly different way.
A few specifics of BIND make this variant of QSBR somewhat simpler:
* We can require that wait-free access to a qp-trie only happens in
an isc_loop callback. The loop provides a natural quiescent state,
after the callbacks are done, when no qp-trie access occurs.
* We can dispense with any API like rcu_synchronize(). In practice,
it takes far too long to wait for a grace period to elapse for each
write to a data structure.
* We use the idea of "phases" (aka epochs or eras) from EBR to
reduce the amount of bookkeeping needed to track memory that is no
longer needed, knowing that the qp-trie does most of that work
already.
I considered hazard pointers for safe memory reclamation. They have
more read-side overhead (updating the hazard pointers) and it wasn't
clear to me how to nicely schedule the cleanup work. Another
alternative, epoch-based reclamation, is designed for fine-grained
lock-free updates, so it needs some rethinking to work well with the
heavily read-biased design of the qp-trie. QSBR has the fastest read
side of the basic SMR algorithms (with no barriers), and fits well
into a libuv loop. More recent hybrid SMR algorithms do not appear to
have enough benefits to justify the extra complexity.
261 lines
4.7 KiB
Makefile
261 lines
4.7 KiB
Makefile
include $(top_srcdir)/Makefile.top
|
|
|
|
lib_LTLIBRARIES = libisc.la
|
|
|
|
libisc_ladir = $(includedir)/isc
|
|
libisc_la_HEADERS = \
|
|
include/isc/aes.h \
|
|
include/isc/align.h \
|
|
include/isc/ascii.h \
|
|
include/isc/assertions.h \
|
|
include/isc/async.h \
|
|
include/isc/atomic.h \
|
|
include/isc/attributes.h \
|
|
include/isc/backtrace.h \
|
|
include/isc/barrier.h \
|
|
include/isc/base32.h \
|
|
include/isc/base64.h \
|
|
include/isc/buffer.h \
|
|
include/isc/cmocka.h \
|
|
include/isc/commandline.h \
|
|
include/isc/condition.h \
|
|
include/isc/counter.h \
|
|
include/isc/crc64.h \
|
|
include/isc/dir.h \
|
|
include/isc/dnsstream.h \
|
|
include/isc/endian.h \
|
|
include/isc/entropy.h \
|
|
include/isc/errno.h \
|
|
include/isc/error.h \
|
|
include/isc/file.h \
|
|
include/isc/formatcheck.h \
|
|
include/isc/fsaccess.h \
|
|
include/isc/fuzz.h \
|
|
include/isc/getaddresses.h \
|
|
include/isc/hash.h \
|
|
include/isc/hashmap.h \
|
|
include/isc/heap.h \
|
|
include/isc/hex.h \
|
|
include/isc/hmac.h \
|
|
include/isc/ht.h \
|
|
include/isc/httpd.h \
|
|
include/isc/interfaceiter.h \
|
|
include/isc/iterated_hash.h \
|
|
include/isc/job.h \
|
|
include/isc/lang.h \
|
|
include/isc/lex.h \
|
|
include/isc/list.h \
|
|
include/isc/log.h \
|
|
include/isc/loop.h \
|
|
include/isc/magic.h \
|
|
include/isc/managers.h \
|
|
include/isc/md.h \
|
|
include/isc/mem.h \
|
|
include/isc/meminfo.h \
|
|
include/isc/mutex.h \
|
|
include/isc/mutexblock.h \
|
|
include/isc/net.h \
|
|
include/isc/netaddr.h \
|
|
include/isc/netmgr.h \
|
|
include/isc/netscope.h \
|
|
include/isc/nonce.h \
|
|
include/isc/once.h \
|
|
include/isc/os.h \
|
|
include/isc/parseint.h \
|
|
include/isc/pause.h \
|
|
include/isc/portset.h \
|
|
include/isc/quota.h \
|
|
include/isc/qsbr.h \
|
|
include/isc/radix.h \
|
|
include/isc/random.h \
|
|
include/isc/ratelimiter.h \
|
|
include/isc/refcount.h \
|
|
include/isc/regex.h \
|
|
include/isc/region.h \
|
|
include/isc/result.h \
|
|
include/isc/rwlock.h \
|
|
include/isc/safe.h \
|
|
include/isc/serial.h \
|
|
include/isc/signal.h \
|
|
include/isc/siphash.h \
|
|
include/isc/sockaddr.h \
|
|
include/isc/stack.h \
|
|
include/isc/stats.h \
|
|
include/isc/stdio.h \
|
|
include/isc/stdtime.h \
|
|
include/isc/strerr.h \
|
|
include/isc/string.h \
|
|
include/isc/symtab.h \
|
|
include/isc/syslog.h \
|
|
include/isc/thread.h \
|
|
include/isc/tid.h \
|
|
include/isc/time.h \
|
|
include/isc/timer.h \
|
|
include/isc/tls.h \
|
|
include/isc/tm.h \
|
|
include/isc/types.h \
|
|
include/isc/url.h \
|
|
include/isc/utf8.h \
|
|
include/isc/util.h \
|
|
include/isc/uv.h \
|
|
include/isc/xml.h \
|
|
include/isc/work.h
|
|
|
|
libisc_la_SOURCES = \
|
|
$(libisc_la_HEADERS) \
|
|
netmgr/netmgr-int.h \
|
|
netmgr/netmgr.c \
|
|
netmgr/socket.c \
|
|
netmgr/streamdns.c \
|
|
netmgr/tcp.c \
|
|
netmgr/timer.c \
|
|
netmgr/tlsstream.c \
|
|
netmgr/udp.c \
|
|
aes.c \
|
|
ascii.c \
|
|
assertions.c \
|
|
async.c \
|
|
backtrace.c \
|
|
base32.c \
|
|
base64.c \
|
|
commandline.c \
|
|
condition.c \
|
|
counter.c \
|
|
crc64.c \
|
|
dir.c \
|
|
entropy.c \
|
|
errno.c \
|
|
errno2result.c \
|
|
errno2result.h \
|
|
error.c \
|
|
file.c \
|
|
fsaccess.c \
|
|
fsaccess_common.c \
|
|
fsaccess_common_p.h \
|
|
getaddresses.c \
|
|
hash.c \
|
|
hashmap.c \
|
|
heap.c \
|
|
hex.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 \
|
|
managers.c \
|
|
md.c \
|
|
mem.c \
|
|
mem_p.h \
|
|
meminfo.c \
|
|
mutex.c \
|
|
mutex_p.h \
|
|
mutexblock.c \
|
|
net.c \
|
|
netaddr.c \
|
|
netscope.c \
|
|
nonce.c \
|
|
openssl_shim.c \
|
|
openssl_shim.h \
|
|
os.c \
|
|
os_p.h \
|
|
parseint.c \
|
|
picohttpparser.c \
|
|
picohttpparser.h \
|
|
portset.c \
|
|
quota.c \
|
|
qsbr.c \
|
|
radix.c \
|
|
random.c \
|
|
random_p.h \
|
|
ratelimiter.c \
|
|
regex.c \
|
|
region.c \
|
|
result.c \
|
|
safe.c \
|
|
serial.c \
|
|
signal.c \
|
|
siphash.c \
|
|
sockaddr.c \
|
|
stats.c \
|
|
stdio.c \
|
|
stdtime.c \
|
|
string.c \
|
|
symtab.c \
|
|
syslog.c \
|
|
thread.c \
|
|
tid.c \
|
|
time.c \
|
|
timer.c \
|
|
tls.c \
|
|
tm.c \
|
|
trampoline.c \
|
|
trampoline_p.h \
|
|
url.c \
|
|
utf8.c \
|
|
uv.c \
|
|
xml.c \
|
|
work.c
|
|
|
|
if USE_ISC_RWLOCK
|
|
libisc_la_SOURCES += \
|
|
rwlock.c
|
|
endif USE_ISC_RWLOCK
|
|
|
|
libisc_la_CPPFLAGS = \
|
|
$(AM_CPPFLAGS) \
|
|
$(LIBISC_CFLAGS) \
|
|
$(LIBUV_CFLAGS) \
|
|
$(OPENSSL_CFLAGS) \
|
|
$(ZLIB_CFLAGS)
|
|
|
|
libisc_la_LDFLAGS = \
|
|
$(AM_LDFLAGS) \
|
|
-release "$(PACKAGE_VERSION)"
|
|
|
|
libisc_la_LIBADD = \
|
|
$(LIBUV_LIBS) \
|
|
$(OPENSSL_LIBS) \
|
|
$(ZLIB_LIBS)
|
|
|
|
if HAVE_JEMALLOC
|
|
libisc_la_CPPFLAGS += \
|
|
$(JEMALLOC_CFLAGS)
|
|
|
|
libisc_la_LIBADD += \
|
|
$(JEMALLOC_LIBS)
|
|
endif HAVE_JEMALLOC
|
|
|
|
if HAVE_JSON_C
|
|
libisc_la_CPPFLAGS += \
|
|
$(JSON_C_CFLAGS)
|
|
|
|
libisc_la_LIBADD += \
|
|
$(JSON_C_LIBS)
|
|
endif HAVE_JSON_C
|
|
|
|
if HAVE_LIBNGHTTP2
|
|
libisc_la_SOURCES += \
|
|
netmgr/http.c
|
|
|
|
libisc_la_CPPFLAGS += \
|
|
$(LIBNGHTTP2_CFLAGS)
|
|
|
|
libisc_la_LIBADD += \
|
|
$(LIBNGHTTP2_LIBS)
|
|
endif
|
|
|
|
if HAVE_LIBXML2
|
|
libisc_la_CPPFLAGS += \
|
|
$(LIBXML2_CFLAGS)
|
|
|
|
libisc_la_LIBADD += \
|
|
$(LIBXML2_LIBS)
|
|
endif HAVE_LIBXML2
|