cvs commit: src/sys/contrib/pf/net pf.c src/sys/dev/cxgb/ulp/tom
cxgb_cpl_socket.c src/sys/kern subr_witness.c src/sys/netinet
in_mcast.c in_pcb.c in_pcb.h ip_divert.c ip_fw2.c ip_options.c
ip_output.c raw_ip.c tcp_input.c tcp_output.c tcp_reass.c ...
Robert Watson
rwatson at FreeBSD.org
Thu Apr 17 21:50:14 UTC 2008
On Thu, 17 Apr 2008, Robert Watson wrote:
> Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to
> explicitly select write locking for all use of the inpcb mutex.
> Update some pcbinfo lock assertions to assert locked rather than
> write-locked, although in practice almost all uses of the pcbinfo
> rwlock main exclusive, and all instances of inpcb lock acquisition
> are exclusive.
>
> This change should introduce (ideally) little functional change.
> However, it lays the groundwork for significantly increased
> parallelism in the TCP/IP code.
>
> MFC after: 3 months
> Tested by: kris (superset of committered patch)
In a week or so, once this change has settled out, I'll merge the UDP locking
changes that Kris and I developed to improve performance with BIND9 and nsd.
Kris has reported significant (>20%) performance improvements in DNS workloads
by virtue of eliminating UDP-layer lock contention by using read locks on the
inpcb on input/output processing, and read locks on the pcbinfo in input
processing. Those changes do, however, increase contention on routing and
device driver/ifqeueu layer locks, which also require attention.
These changes are on the slow path to an MFC, assuming now ABI (or more
general) problems arise. If you experience any performance loss as a result
of this change, please let me know ASAP -- in principle exclusive rwlocks are
very much lock mutexes, but perhaps something has been missed (or
misunderstood).
Thanks,
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the cvs-src
mailing list