svn commit: r260151 - head/sys/netinet6
Adrian Chadd
adrian at FreeBSD.org
Wed Jan 1 00:56:27 UTC 2014
Author: adrian
Date: Wed Jan 1 00:56:26 2014
New Revision: 260151
URL: http://svnweb.freebsd.org/changeset/base/260151
Log:
Use an RLOCK here instead of an RWLOCK - matching all the other calls
to lla_lookup().
This drastically reduces the very high lock contention when doing parallel
TCP throughput tests (> 1024 sockets) with IPv6.
Tested:
* parallel IPv6 TCP bulk data exchange, 8192 sockets
MFC after: 1 week
Sponsored by: Netflix, Inc.
Modified:
head/sys/netinet6/nd6.c
Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c Wed Jan 1 00:45:28 2014 (r260150)
+++ head/sys/netinet6/nd6.c Wed Jan 1 00:56:26 2014 (r260151)
@@ -1891,9 +1891,9 @@ nd6_output_lle(struct ifnet *ifp, struct
flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0;
if (ln == NULL) {
retry:
- IF_AFDATA_LOCK(ifp);
+ IF_AFDATA_RLOCK(ifp);
ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)dst);
- IF_AFDATA_UNLOCK(ifp);
+ IF_AFDATA_RUNLOCK(ifp);
if ((ln == NULL) && nd6_is_addr_neighbor(dst, ifp)) {
/*
* Since nd6_is_addr_neighbor() internally calls nd6_lookup(),
More information about the svn-src-head
mailing list