Commit Graph
12411 Commits
Author SHA1 Message Date
Witold Kręcicki e5bda0d2e8 fixup! Cleaning up 2020-02-10 10:44:36 +01:00
Witold Kręcicki 19c11103f0 Revert "Reset affinity of LOWAC worker"
This reverts commit 38853183adf6846f2bc4ade9dc41734e199ec0a5.
2020-02-10 10:44:36 +01:00
Witold Kręcicki 1cf25df406 fixup! PoC LOWAC 2020-02-10 10:44:36 +01:00
Witold Kręcicki b0c1765501 fixup! Cleaning up 2020-02-10 10:44:36 +01:00
Witold Kręcicki 1b10390863 Reset affinity of LOWAC worker 2020-02-10 10:44:36 +01:00
Witold Kręcicki 661b15f25b Check if we have a view before LOWAC-caching 2020-02-10 10:44:35 +01:00
Witold Kręcicki e8dc021560 Use memcpy instead of byte-by-byte in dns_name_fromwire 2020-02-10 10:44:35 +01:00
Witold Kręcicki 7c806002c3 Minor fixes 2020-02-10 10:44:35 +01:00
Witold Kręcicki cf367bd64f Don't overuse isc_time_now(), use local time 2020-02-10 10:44:35 +01:00
Witold Kręcicki c9e6c59bc2 WiP 2020-02-10 10:44:35 +01:00
Witold Kręcicki 96ff385777 Allocate memory for blob: 2020-02-10 10:44:35 +01:00
Witold Kręcicki 36bc9ac28b Longer cache time 2020-02-10 10:44:35 +01:00
Witold Kręcicki 0b517735f2 Always enqueue removal after replacement 2020-02-10 10:44:35 +01:00
Witold Kręcicki 3edde4d190 Fixes 2020-02-10 10:44:35 +01:00
Witold Kręcicki 918af04b9d Mark unused memory 2020-02-10 10:44:35 +01:00
Witold Kręcicki 8279b866bc Add some magic checks 2020-02-10 10:44:35 +01:00
Witold Kręcicki ac88ecbbaa Fixes 2020-02-10 10:44:35 +01:00
Witold Kręcicki bb1bd0bcac Revert "Use common isc_time"
This reverts commit 1c5ba6ba8af5fb7e65456ef8b846afdc874b77a2.
2020-02-10 10:44:35 +01:00
Witold Kręcicki d1b608e7a2 Iterator fix 2020-02-10 10:44:35 +01:00
Witold Kręcicki 6d69556eea Use common isc_time 2020-02-10 10:44:35 +01:00
Witold Kręcicki a65d7597a9 Cleanup better 2020-02-10 10:44:35 +01:00
Witold Kręcicki cc0b84e84b More fiddling 2020-02-10 10:44:35 +01:00
Witold Kręcicki 55ce821070 Some fiddling 2020-02-10 10:44:35 +01:00
Witold Kręcicki 6c4447015d Cleaning up 2020-02-10 10:44:35 +01:00
Witold Kręcicki 0209c9f9ac Cleaning up 2020-02-10 10:44:35 +01:00
Witold Kręcicki 56d8a6060b Test: ck_fifo 2020-02-10 10:44:35 +01:00
Witold Kręcicki 2a82f35029 PoC LOWAC 2020-02-10 10:44:35 +01:00
Witold Kręcicki 14a852b86d fixup! Make client resolver tasks pooled and CPU-bound 2020-02-07 11:21:49 +01:00
Witold Kręcicki 30675428d8 Fix a race in isc_socket destruction.
There was a very slim chance of a race between isc_socket_detach and
process_fd: isc_socket_detach decrements references to 0, and before it
calls destroy gets preempted. Second thread calls process_fd, increments
socket references temporarily to 1, and then gets preempted, first thread
then hits assertion in destroy() as the reference counter is now 1 and
not 0.
2020-02-07 08:42:02 +01:00
Witold Kręcicki 16dd6d8068 Use ISC_SOCKET_MAXSOCKETS at 64k no matter what the tuning would be, those affect only the recursion now 2020-02-07 08:41:53 +01:00
Witold Kręcicki 46fe61d359 Add an arena to compressctx 2020-02-07 08:41:53 +01:00
Witold Kręcicki 9fda4a4cbf Remove some stale fields from ns_client_t; make sendbuf allocated on heap 2020-02-07 08:40:25 +01:00
Witold Kręcicki e80ac06ed4 Don't update LRU if the node was recently used.
Updating LRU requires write-locking the node, which causes contention.
Update LRU only if time difference is large enough.
2020-02-07 08:40:25 +01:00
Witold Kręcicki aaa13532c2 Use libuv-provided uv_{export,import} if available 2020-02-07 08:40:25 +01:00
Witold Kręcicki 91d5c3313c Bucketed statistics.
Even though statistics are lockless they still use atomics which
might cause contention. Split stats counters into buckets, sharded
by an artificial thread identifier, to increase throughput.
2020-02-07 08:40:25 +01:00
Witold Kręcicki a1b6eae847 Don't enable NS_CLIENT_TRACE by default 2020-02-07 08:40:25 +01:00
Witold Kręcicki efc2a21590 Increase inactivehandles and inactivereqs size for better reuse. 2020-02-07 08:40:25 +01:00
Witold Kręcicki 0a21285b11 We don't need to fill udp local address every time since we are bound to it. 2020-02-07 08:40:25 +01:00
Witold Kręcicki 2985bcd7ef Make nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage. 2020-02-07 08:40:25 +01:00
Witold Kręcicki caf309a80f Fix atomics usage for mutexatomics 2020-02-07 08:40:25 +01:00
Witold Kręcicki 85a3cc6ffa Disable OpenSSL siphash.
Creation of EVP_MD_CTX and EVP_PKEY is quite expensive, until
we fix the code to reuse the context and key we'll use our own
implementation of siphash.
2020-02-07 08:40:25 +01:00
Witold Kręcicki 235c3e8685 Use the original threadid when sending a UDP packet to decrease probability of context switching 2020-02-07 08:40:25 +01:00
Witold Kręcicki 666b0f7564 Make client resolver tasks pooled and CPU-bound 2020-02-07 08:40:25 +01:00
Witold Kręcicki bcb55107ac Make isc_task_pause/isc_task_unpause thread safe.
isc_task_pause/unpause were inherently thread-unsafe - a task
could be paused only once by one thread, if the task was running
while we paused it it led to races. Fix it by making sure that
the task will pause if requested to, and by using a 'pause reference
counter' to count task pause requests - a task will be unpaused
iff all threads unpause it.

Don't remove from queue when pausing task - we lock the queue lock
(expensive), while it's unlikely that the task will be running -
and we'll remove it anyway in dispatcher
2020-02-07 08:40:25 +01:00
Witold Kręcicki b5afff59c2 Increase nodelock count for both cache and regular db. 2020-02-07 08:40:25 +01:00
Witold Kręcicki 79fc0e3f01 Use isc_rwlock for isc_result tables 2020-02-07 08:40:25 +01:00
Witold Kręcicki b21e515e1b Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid 2020-02-07 08:40:24 +01:00
Witold Kręcicki b42ac28eb1 Don't check if the client is on recursing list (requires locking) if it's not RECURSING 2020-02-07 08:40:24 +01:00
Matthijs Mekking e6c5ecd698 Update kasp test with CDNSKEY checks
Add checks to the kasp system test to verify CDNSKEY publication.
This test is not entirely complete, because when there is a CDNSKEY
available but there should not be one for KEY N, it is hard to tell
whether the existing CDNSKEY actually belongs to KEY N or another
key.

The check works if we expect a CDNSKEY although we cannot guarantee
that the CDNSKEY is correct: The test verifies existence, not
correctness of the record.
2020-02-06 11:02:22 +01:00
Matthijs Mekking a9a9aa7fd8 Add parentheses around return values 2020-02-06 10:17:22 +01:00