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.
This commit is contained in:
parent
82c2441b7d
commit
64782f1b07
@ -1891,9 +1891,9 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
|
||||
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(),
|
||||
|
Loading…
Reference in New Issue
Block a user