Commit Graph

5 Commits

Author SHA1 Message Date
JackDoan 7fe4fab167 tun: default pin CPUs avoid NIC IRQ cores
When tun.pin_threads is on and tun.cpu_affinity is unset, pick pin CPUs
from the allowed set that do not service any up physical NIC's MSI vectors
(read-only walk of /sys/class/net/*/device/msi_irqs and
/proc/irq/*/effective_affinity_list). The old allowed[i] default pinned
encrypt threads onto exactly the cores drivers affine their first RX queue
IRQs to; a flow whose RSS queue fired there had NAPI fighting encrypt for
the core (measured 8.4 vs 10.2 Gbps REV bimodality). Falls back to the old
spread, with a log, when there aren't enough IRQ-free CPUs - e.g. drivers
that allocate one queue per core until the admin narrows them (ethtool -L).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 15:20:04 -05:00
JackDoan 49028cb755 some tests 2026-07-14 11:00:55 -05:00
Nate Brown bcabcfdaca Rework some things into packages (#489) 2021-11-03 20:54:04 -05:00
Nathan Brown 3ea7e1b75f Don't use a global logger (#423) 2021-03-26 09:46:30 -05:00
Slack Security Team f22b4b584d Public Release 2019-11-19 17:00:20 +00:00