Contributed by Peter N. M. Hansteen on from the faster packets, more dept.
tech@
titled UDP parallel input, Alexander Bluhm (bluhm@
) offers a diff that enables parallel UDP input for -current
.
The message reads,
List: openbsd-tech Subject: UDP parallel input From: Alexander Bluhm <bluhm () openbsd ! org> Date: 2024-07-23 13:40:21 Hi, mvs@ has completed the final bits to make socket buffer MP safe for UDP packets. This means that we can run UDP input on multiple threads. Diff below activates this.
Usually IP processing runs on multiple softnet threads with shared net lock. From there local packets are queued and processed by one thread with exclusive net lock. If the PR_MPINPUT flag is set, protocol input is called directly from IP input on multiple threads, shared net lock and no additional queueing. Note that you need kernel sources from at least Sun Jul 21. Then apply this diff and test UDP local delivery to sockets. To see an performance effect, you need multiple CPUs and network interfaces that support multiqueue. These are bnxt, igc, ix, ixl, ngbe, vmx. Please test! bluhm
followed by the rather short diff that enables the code.
This is (yet another) opportunity to test and help improve the upcoming release if you feel up to it.
Update 2024-07-26: The code has now been committed.
(Comments are closed)
By John McCue (jmcunx) jmcq66@comcast.net on
I have no idea what UDP is, so instead of searching the WEB I decided to try "man udp".
Up pops a manual, nice and unexpected. So I have a bit of an idea on what it is without doing a painful WEB search.
Very nice!