My weekend project has been improving UDP transmit performance:
https://github.com/ScaleBSD/scalebsd.github.io/blob/master/_drafts/2018-05-12-UDP-On-FreeBSD-is-anyone-using-this-at-scale.md
- To address the contention on ifnet_rwlock seen in the second flame graph I replaced rlock calls with epoch_{enter, exit} and made the necessary changes to ensure a grace period elapsed on deletion of ifnet and other things whose liveness is protected by said lock.
- To address the contention on the ifaddr reference that that in turn revealed I ensured that all short term references to an ifaddr were instead protected by epoch. Refcount updates are now only needed for persistent references on the heap.