]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optionally bind ktls threads to NUMA domains
authorgallatin <gallatin@FreeBSD.org>
Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)
committergallatin <gallatin@FreeBSD.org>
Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)
commite41ad4add5d5a0079b078614a5c3b4fa9478e317
tree05fb1928d02f84e6d047a78e405e9caee69bdbb8
parent5a4b111b5dc45e2389097393522fc07361c18777
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