From: Ondřej Surý Date: Tue, 13 Jul 2021 07:51:49 +0000 (+0200) Subject: Disable setting the thread affinity X-Git-Tag: v9.17.17~27^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9e6a7ae57efec797d150da4021caf25067844c5;p=thirdparty%2Fbind9.git Disable setting the thread affinity 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. --- diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index b495cb615d2..ef17cfb2342 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -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) { /* diff --git a/lib/isc/socket.c b/lib/isc/socket.c index 4b22d07fadc..5bf8a1ffb7a 100644 --- a/lib/isc/socket.c +++ b/lib/isc/socket.c @@ -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)