]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable setting the thread affinity
authorOndřej Surý <ondrej@isc.org>
Tue, 13 Jul 2021 07:51:49 +0000 (09:51 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 13 Jul 2021 12:48:29 +0000 (14:48 +0200)
It was discovered that setting the thread affinity on both the netmgr
and netthread threads lead to inconsistent recursive performance because
sometimes the netmgr and netthread threads would compete over single
resource and sometimes not.

Removing setting the affinity causes a slight dip in the authoritative
performance around 5% (the measured range was from 3.8% to 7.8%), but
the recursive performance is now consistently good.

lib/isc/netmgr/netmgr.c
lib/isc/socket.c

index b495cb615d2e000302d1731072817b9c5695f42d..ef17cfb23427149c878b08698de6702ec0e8d2c5 100644 (file)
@@ -670,7 +670,6 @@ nm_thread(isc_threadarg_t worker0) {
        isc_nm_t *mgr = worker->mgr;
 
        isc__nm_tid_v = worker->id;
-       isc_thread_setaffinity(isc__nm_tid_v);
 
        while (true) {
                /*
index 4b22d07fadc9a7132aa99ecc93cd519c78271b8a..5bf8a1ffb7aa493c22548dc8c8b1bca36d11cfdf 100644 (file)
@@ -3356,9 +3356,6 @@ netthread(void *uap) {
        (void)manager;
        bool done;
        int cc;
-       if (manager->nthreads > 1) {
-               isc_thread_setaffinity(thread->threadid);
-       }
 #ifdef USE_KQUEUE
        const char *fnname = "kevent()";
 #elif defined(USE_EPOLL)