Compare commits

...

19 Commits

Author SHA1 Message Date
Witold Kręcicki
b07b6e9efb Don't set buf sizes - use system defaults 2020-04-17 11:30:35 +02:00
Witold Kręcicki
f69f99f714 tuning 2020-04-16 00:19:35 +02:00
Witold Kręcicki
9db6352264 tuning 2020-04-15 22:39:01 +02:00
Witold Kręcicki
2da599999e tuning 2020-04-15 11:42:55 +02:00
Witold Kręcicki
b9c64bbfe6 tuning 2020-04-15 11:32:28 +02:00
Witold Kręcicki
cabdc0db54 tuning 2020-04-15 11:03:59 +02:00
Witold Kręcicki
e0e606293b tuning 2020-04-15 10:49:49 +02:00
Witold Kręcicki
9fe83658fb default write quota 2020-04-15 09:56:46 +02:00
Witold Kręcicki
a02280a241 write quota up to 8 2020-04-15 09:50:34 +02:00
Witold Kręcicki
039c763261 adaptive count back to 100, write quota down to 1 2020-04-15 09:45:49 +02:00
Witold Kręcicki
c480888b87 Spin 10 times, not 100 times 2020-04-15 09:36:37 +02:00
Witold Kręcicki
b60a7668df Revert "Disable spinning properly"
This reverts commit a062ca539d.
2020-04-15 09:33:36 +02:00
Witold Kręcicki
a062ca539d Disable spinning properly 2020-04-15 09:24:11 +02:00
Witold Kręcicki
dd8c7fcd83 Revert "Disable spinning"
This reverts commit ca8aa26851.
2020-04-15 09:22:12 +02:00
Witold Kręcicki
b9e48db684 rev 2020-04-14 22:53:02 +02:00
Witold Kręcicki
ca8aa26851 Disable spinning 2020-04-14 22:33:53 +02:00
Witold Kręcicki
065f3c4f90 prefer writer everytime 2020-04-14 14:58:44 +02:00
Witold Kręcicki
327d362570 Experiment 3: rwlock prefer writer only for treelock 2020-04-14 14:51:56 +02:00
Witold Kręcicki
c1f1a17379 Experiment 2 - use PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2020-04-14 14:51:51 +02:00
4 changed files with 14 additions and 21 deletions

View File

@@ -146,10 +146,6 @@ isc__nm_async_udplisten(isc__networker_t *worker, isc__netievent_t *ev0) {
isc__nm_incstats(sock->mgr, sock->statsindex[STATID_BINDFAIL]);
}
uv_recv_buffer_size(&sock->uv_handle.handle,
&(int){ 16 * 1024 * 1024 });
uv_send_buffer_size(&sock->uv_handle.handle,
&(int){ 16 * 1024 * 1024 });
uv_udp_recv_start(&sock->uv_handle.udp, isc__nm_alloc_cb, udp_recv_cb);
}

View File

@@ -36,7 +36,13 @@ isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota) {
UNUSED(read_quota);
UNUSED(write_quota);
REQUIRE(pthread_rwlock_init(&rwl->rwlock, NULL) == 0);
if (1) {
pthread_rwlockattr_t attr;
pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_READER_NP);
REQUIRE(pthread_rwlock_init(&rwl->rwlock, &attr) == 0);
} else {
REQUIRE(pthread_rwlock_init(&rwl->rwlock, NULL) == 0);
}
atomic_init(&rwl->downgrade, false);
return (ISC_R_SUCCESS);
}
@@ -130,18 +136,6 @@ isc_rwlock_destroy(isc_rwlock_t *rwl) {
#define RWLOCK_MAGIC ISC_MAGIC('R', 'W', 'L', 'k')
#define VALID_RWLOCK(rwl) ISC_MAGIC_VALID(rwl, RWLOCK_MAGIC)
#ifndef RWLOCK_DEFAULT_READ_QUOTA
#define RWLOCK_DEFAULT_READ_QUOTA 4
#endif /* ifndef RWLOCK_DEFAULT_READ_QUOTA */
#ifndef RWLOCK_DEFAULT_WRITE_QUOTA
#define RWLOCK_DEFAULT_WRITE_QUOTA 4
#endif /* ifndef RWLOCK_DEFAULT_WRITE_QUOTA */
#ifndef RWLOCK_MAX_ADAPTIVE_COUNT
#define RWLOCK_MAX_ADAPTIVE_COUNT 100
#endif /* ifndef RWLOCK_MAX_ADAPTIVE_COUNT */
#if defined(_MSC_VER)
#include <intrin.h>
#define isc_rwlock_pause() YieldProcessor()

View File

@@ -1943,6 +1943,8 @@ free_socket(isc__socket_t **socketp) {
isc_mem_put(sock->manager->mctx, sock, sizeof(*sock));
}
#undef SO_RCVBUF
#undef SO_SNDBUF
#ifdef SO_RCVBUF
static isc_once_t rcvbuf_once = ISC_ONCE_INIT;

View File

@@ -14,7 +14,7 @@ set -e
SELF="$(basename $0)"
SELF="${SELF/-/ }"
STATE_FILE=".git/REPLAY_MERGE"
STATE_FILE="REPLAY_MERGE"
DONT_PUSH=${DONT_PUSH:=false}
DONT_ACCEPT=${DONT_ACCEPT:=false}
@@ -62,9 +62,10 @@ die_before_push() {
}
die_if_wrong_dir() {
if [[ ! -d ".git" ]]; then
die "You need to run this command from the toplevel of the working tree."
fi
# if [[ ! -d ".git" ]]; then
echo die "You need to run this command from the toplevel of the working tree."
# fi
}
die_if_not_in_progress() {