Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
068bfa6a21 | ||
|
|
617a9ee373 | ||
|
|
c1a945cfdc | ||
|
|
206e67b008 | ||
|
|
c7a236e49e | ||
|
|
19674c5c6e | ||
|
|
c6d5e8bc86 | ||
|
|
90f29d61d2 | ||
|
|
a7e6c06ef7 | ||
|
|
0ea634a5db | ||
|
|
893571a19d | ||
|
|
6f8a75e6e1 | ||
|
|
929fb51612 | ||
|
|
fb39babdff | ||
|
|
b649786423 |
+2
-2
@@ -342,8 +342,8 @@ libdns_la_LIBADD += $(LMDB_LIBS)
|
||||
endif
|
||||
|
||||
if !HAVE_SYSTEMTAP
|
||||
DTRACE_DEPS = libdns_la-xfrin.lo
|
||||
DTRACE_OBJS = .libs/libdns_la-xfrin.$(OBJEXT)
|
||||
DTRACE_DEPS = libdns_la-xfrin.lo libdns_la-qpcache.lo
|
||||
DTRACE_OBJS = .libs/libdns_la-xfrin.$(OBJEXT) .libs/libdns_la-qpcache.$(OBJEXT)
|
||||
endif
|
||||
|
||||
include $(top_srcdir)/Makefile.dtrace
|
||||
|
||||
@@ -75,7 +75,7 @@ struct dns_slabheader {
|
||||
dns_ttl_t ttl;
|
||||
dns_typepair_t type;
|
||||
atomic_uint_least16_t attributes;
|
||||
dns_trust_t trust;
|
||||
atomic_uint_fast16_t trust;
|
||||
|
||||
unsigned int heap_index;
|
||||
/*%<
|
||||
|
||||
@@ -27,4 +27,7 @@ provider libdns {
|
||||
probe xfrin_recv_try_axfr(void *, char *, int);
|
||||
probe xfrin_sent(void *, char *, int);
|
||||
probe xfrin_start(void *, char *);
|
||||
|
||||
probe qpcache_addrdataset_done(void *, uint32_t, bool overmem);
|
||||
probe qpcache_addrdataset_start(void *, uint32_t);
|
||||
};
|
||||
|
||||
+1
-1
@@ -1058,7 +1058,7 @@ dns_qpmulti_memusage(dns_qpmulti_t *multi) {
|
||||
|
||||
dns_qp_memusage_t memusage = dns_qp_memusage(qp);
|
||||
|
||||
if (qp->transaction_mode == QP_UPDATE) {
|
||||
if (qp->transaction_mode == QP_UPDATE && qp->usage != NULL) {
|
||||
memusage.bytes -= QP_CHUNK_BYTES;
|
||||
memusage.bytes += qp->usage[qp->bump].used *
|
||||
sizeof(dns_qpnode_t);
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ enum {
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
#define QP_CHUNK_LOG 7
|
||||
#else
|
||||
#define QP_CHUNK_LOG 10
|
||||
#define QP_CHUNK_LOG 12
|
||||
#endif
|
||||
|
||||
STATIC_ASSERT(6 <= QP_CHUNK_LOG && QP_CHUNK_LOG <= 20,
|
||||
|
||||
+368
-554
File diff suppressed because it is too large
Load Diff
@@ -1407,9 +1407,7 @@ static void
|
||||
rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) {
|
||||
dns_slabheader_t *header = dns_slabheader_fromrdataset(rdataset);
|
||||
|
||||
dns_db_locknode(header->db, header->node, isc_rwlocktype_write);
|
||||
header->trust = rdataset->trust = trust;
|
||||
dns_db_unlocknode(header->db, header->node, isc_rwlocktype_write);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+1
-2
@@ -5190,7 +5190,7 @@ validated(void *arg) {
|
||||
result = ISC_R_NOTFOUND;
|
||||
if (val->rdataset != NULL) {
|
||||
result = dns_db_findnode(fctx->cache, val->name,
|
||||
true, &node);
|
||||
false, &node);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
(void)dns_db_deleterdataset(fctx->cache, node,
|
||||
@@ -5815,7 +5815,6 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message,
|
||||
/*
|
||||
* Find or create the cache node.
|
||||
*/
|
||||
node = NULL;
|
||||
result = dns_db_findnode(fctx->cache, name, true, &node);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
|
||||
+2
-2
@@ -260,8 +260,8 @@ libisc_la_LIBADD += \
|
||||
endif HAVE_LIBXML2
|
||||
|
||||
if !HAVE_SYSTEMTAP
|
||||
DTRACE_DEPS = libisc_la-rwlock.lo libisc_la-job.lo
|
||||
DTRACE_OBJS = .libs/libisc_la-rwlock.$(OBJEXT) .libs/libisc_la-job.$(OBJEXT)
|
||||
DTRACE_DEPS = libisc_la-rwlock.lo libisc_la-job.lo libisc_la-loop.lo
|
||||
DTRACE_OBJS = .libs/libisc_la-rwlock.$(OBJEXT) .libs/libisc_la-job.$(OBJEXT) .libs/libisc_la-loop.$(OBJEXT)
|
||||
endif
|
||||
|
||||
include $(top_srcdir)/Makefile.dtrace
|
||||
|
||||
@@ -225,4 +225,14 @@ isc_loop_shuttingdown(isc_loop_t *loop);
|
||||
*
|
||||
* \li 'loop' is a valid loop and the loop tid matches the current tid.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_loop_rcu_barrier(isc_loop_t *loop);
|
||||
/*%<
|
||||
* Triggers an rcu_barrier() call at the end of the current loop tick.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
* \li 'loop' is a valid loop and the loop tid matches the current tid.
|
||||
*/
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
+18
-1
@@ -41,6 +41,7 @@
|
||||
#include "async_p.h"
|
||||
#include "job_p.h"
|
||||
#include "loop_p.h"
|
||||
#include "probes.h"
|
||||
|
||||
/**
|
||||
* Private
|
||||
@@ -236,7 +237,9 @@ loop_init(isc_loop_t *loop, isc_loopmgr_t *loopmgr, uint32_t tid) {
|
||||
|
||||
static void
|
||||
quiescent_cb(uv_prepare_t *handle) {
|
||||
UNUSED(handle);
|
||||
isc_loop_t *loop = uv_handle_get_data(handle);
|
||||
|
||||
LIBISC_LOOP_QUIESCENT_CB_START(loop, loop->rcu_barrier);
|
||||
|
||||
#if defined(RCU_QSBR)
|
||||
/* safe memory reclamation */
|
||||
@@ -247,6 +250,12 @@ quiescent_cb(uv_prepare_t *handle) {
|
||||
#else
|
||||
INSIST(!rcu_read_ongoing());
|
||||
#endif
|
||||
|
||||
if (loop->rcu_barrier) {
|
||||
rcu_barrier();
|
||||
}
|
||||
|
||||
LIBISC_LOOP_QUIESCENT_CB_DONE(loop, loop->rcu_barrier);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -624,3 +633,11 @@ isc_loop_shuttingdown(isc_loop_t *loop) {
|
||||
|
||||
return (loop->shuttingdown);
|
||||
}
|
||||
|
||||
void
|
||||
isc_loop_rcu_barrier(isc_loop_t *loop) {
|
||||
REQUIRE(VALID_LOOP(loop));
|
||||
REQUIRE(loop->tid == isc_tid());
|
||||
|
||||
loop->rcu_barrier = true;
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ struct isc_loop {
|
||||
|
||||
/* safe memory reclamation */
|
||||
uv_prepare_t quiescent;
|
||||
|
||||
bool rcu_barrier;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,4 +27,7 @@ provider libisc {
|
||||
probe rwlock_wrlock_acq(void *);
|
||||
probe rwlock_wrlock_req(void *);
|
||||
probe rwlock_wrunlock(void *);
|
||||
|
||||
probe loop_quiescent_cb_done(void *, bool);
|
||||
probe loop_quiescent_cb_start(void *, bool);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user