From owner-cvs-src@FreeBSD.ORG Thu Apr 17 21:50:14 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B349A106566B; Thu, 17 Apr 2008 21:50:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 820038FC17; Thu, 17 Apr 2008 21:50:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2014B46B7B; Thu, 17 Apr 2008 17:50:14 -0400 (EDT) Date: Thu, 17 Apr 2008 22:50:14 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <200804172138.m3HLcIr4007493@repoman.freebsd.org> Message-ID: <20080417224830.E94395@fledge.watson.org> References: <200804172138.m3HLcIr4007493@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: 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 ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 21:50:14 -0000 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