summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-07-15 15:38:47 +0000
committerrwatson <rwatson@FreeBSD.org>2008-07-15 15:38:47 +0000
commit6d9661b22428319f8d87375a3d6f69afda13469a (patch)
tree9e83efd11a5d307fd93a89b13bf38f242e705cf1 /usr.sbin
parent2d49f66781d711152d390cc98a26f9b781a5255a (diff)
downloadFreeBSD-src-6d9661b22428319f8d87375a3d6f69afda13469a.zip
FreeBSD-src-6d9661b22428319f8d87375a3d6f69afda13469a.tar.gz
Merge last of a series of rwlock conversion changes to UDP, which
completes the move to a fully parallel UDP transmit path by using global read, rather than write, locking of inpcbinfo in further semi-connected cases: - Add macros to allow try-locking of inpcb and inpcbinfo. - Always acquire an incpcb read lock in udp_output(), which stablizes the local inpcb address and port bindings in order to determine what further locking is required: - If the inpcb is currently not bound (at all) and are implicitly connecting, we require inpcbinfo and inpcb write locks, so drop the read lock and re-acquire. - If the inpcb is bound for at least one of the port or address, but an explicit source or destination is requested, trylock the inpcbinfo lock, and if that fails, drop the inpcb lock, lock the global lock, and relock the inpcb lock. - Otherwise, no further locking is required (common case). - Update comments. In practice, this means that the vast majority of consumers of UDP sockets will not acquire any exclusive locks at the socket or UDP levels of the network stack. This leads to a marked performance improvement in several important workloads, including BIND, nsd, and memcached over UDP, as well as significant improvements in pps microbenchmarks. The plan is to MFC all of the rwlock changes to RELENG_7 once they have settled for a weeks in the tree. Tested by: ps, kris (older revision), bde MFC after: 3 weeks
Diffstat (limited to 'usr.sbin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud