2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

fix: usr: Do not set SO_INCOMING_CPU

We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue by setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

Closes #4936

Merge branch '4936-remove-so-incoming-cpu' into 'main'

See merge request isc-projects/bind9!9497
This commit is contained in:
Alessio Podda
2024-09-16 12:56:25 +00:00
4 changed files with 0 additions and 24 deletions

View 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);
/*%<

View 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) {
/*

View 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 */

View 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);