OpenBSD Journal

UDP parallel input committed to -current

Contributed by rueda on from the UDP-Done-in-Parallel dept.

Support for UDP parallel input [on which we reported previously] has been committed to -current by Alexander Bluhm (bluhm@):

CVSROOT:	/cvs
Module name:	src
Changes by:	bluhm@cvs.openbsd.org	2024/07/26 08:38:20

Modified files:
	sys/netinet    : in_proto.c 
	sys/netinet6   : in6_proto.c 

Log message:
Run UDP input on multiple CPU in parallel.
The socket layer of UDP has been made fully MP safe.  UDP output
is MP safe for a while.  mvs@ has fixed the missing pieces in socket
splicing recently.  This means that complete UDP stack can be
processed by multiple threads now.  Activate multi processing for
udp_input() when called with IPv4 or IPv6 packets.

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,
with shared net lock and no additional queueing.

tested by Hrvoje Popovski; OK mvs@

Congratulations and thanks to all involved!

(Comments are closed)


Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]