]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optionally bind ktls threads to NUMA domains
authorAndrew Gallatin <gallatin@FreeBSD.org>
Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)
committerAndrew Gallatin <gallatin@FreeBSD.org>
Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)
commit02bc3865aadf1bfd907bbf555e26719744ebf3c9
tree05fb1928d02f84e6d047a78e405e9caee69bdbb8
parentf6d234d8706fa4ad513bb5db2976b0e354a0f0fe
Optionally bind ktls threads to NUMA domains

When ktls_bind_thread is 2, we pick a ktls worker thread that is
bound to the same domain as the TCP connection associated with
the socket. We use roughly the same code as netinet/tcp_hpts.c to
do this. This allows crypto to run on the same domain as the TCP
connection is associated with. Assuming TCP_REUSPORT_LB_NUMA
(D21636) is in place & in use, this ensures that the crypto source
and destination buffers are local to the same NUMA domain as we're
running crypto on.

This change (when TCP_REUSPORT_LB_NUMA, D21636, is used) reduces
cross-domain traffic from over 37% down to about 13% as measured
by pcm.x on a dual-socket Xeon using nginx and a Netflix workload.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D21648
sys/kern/uipc_ktls.c