Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2008 22:50:14 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: 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 ...
Message-ID:  <20080417224830.E94395@fledge.watson.org>
In-Reply-To: <200804172138.m3HLcIr4007493@repoman.freebsd.org>
References:  <200804172138.m3HLcIr4007493@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080417224830.E94395>