]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not set SO_INCOMING_CPU
authoralessio <alessio@isc.org>
Thu, 12 Sep 2024 14:48:00 +0000 (16:48 +0200)
committerAlessio Podda <alessio@isc.org>
Mon, 16 Sep 2024 12:18:22 +0000 (12:18 +0000)
We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue and setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/socket.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/udp.c

index 03f7ba3a086d03688600c6fdc4d200421e776109..1b7e881b5b61a0b2e131c6888b3864824ea8c278 100644 (file)
@@ -1331,12 +1331,6 @@ isc__nm_socket_reuse_lb(uv_os_sock_t fd);
  * Set the SO_REUSEPORT_LB (or equivalent) socket option on the fd
  */
 
-isc_result_t
-isc__nm_socket_incoming_cpu(uv_os_sock_t fd);
-/*%<
- * Set the SO_INCOMING_CPU socket option on the fd if available
- */
-
 isc_result_t
 isc__nm_socket_disable_pmtud(uv_os_sock_t fd, sa_family_t sa_family);
 /*%<
index 2b1e0e652e1a956ecc14e3b94ddafc74f467505c..7440c0b855736a5f440a7bdfe1c3d0f55da4d660 100644 (file)
@@ -218,20 +218,6 @@ isc__nm_socket_reuse_lb(uv_os_sock_t fd) {
 #endif
 }
 
-isc_result_t
-isc__nm_socket_incoming_cpu(uv_os_sock_t fd) {
-#ifdef SO_INCOMING_CPU
-       if (setsockopt_on(fd, SOL_SOCKET, SO_INCOMING_CPU) == -1) {
-               return (ISC_R_FAILURE);
-       } else {
-               return (ISC_R_SUCCESS);
-       }
-#else
-       UNUSED(fd);
-#endif
-       return (ISC_R_NOTIMPLEMENTED);
-}
-
 isc_result_t
 isc__nm_socket_disable_pmtud(uv_os_sock_t fd, sa_family_t sa_family) {
        /*
index c106968c264160da52ee69437d8adfe0ea12f257..f43b1118b035d05af0b89b9a6f390232f9c679c4 100644 (file)
@@ -285,7 +285,6 @@ isc__nm_tcp_lb_socket(isc_nm_t *mgr, sa_family_t sa_family) {
        result = isc__nm_socket(sa_family, SOCK_STREAM, 0, &sock);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
-       (void)isc__nm_socket_incoming_cpu(sock);
        (void)isc__nm_socket_v6only(sock, sa_family);
 
        /* FIXME: set mss */
index 1bcff168b285146ab25281321d6d676719e762f7..653ef778d349224c0c7ec9fab548372cb8080a94 100644 (file)
@@ -74,7 +74,6 @@ isc__nm_udp_lb_socket(isc_nm_t *mgr, sa_family_t sa_family) {
        result = isc__nm_socket(sa_family, SOCK_DGRAM, 0, &sock);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
-       (void)isc__nm_socket_incoming_cpu(sock);
        (void)isc__nm_socket_disable_pmtud(sock, sa_family);
        (void)isc__nm_socket_v6only(sock, sa_family);
 
@@ -810,8 +809,6 @@ isc_nm_udpconnect(isc_nm_t *mgr, isc_sockaddr_t *local, isc_sockaddr_t *peer,
        RUNTIME_CHECK(result == ISC_R_SUCCESS ||
                      result == ISC_R_NOTIMPLEMENTED);
 
-       (void)isc__nm_socket_incoming_cpu(sock->fd);
-
        (void)isc__nm_socket_disable_pmtud(sock->fd, sa_family);
 
        (void)isc__nm_socket_min_mtu(sock->fd, sa_family);