From owner-cvs-src@FreeBSD.ORG Mon Jul 7 11:14:17 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 A784E10656E4; Mon, 7 Jul 2008 11:14:17 +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 689F88FC22; Mon, 7 Jul 2008 11:14:17 +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 5C11E46C65; Mon, 7 Jul 2008 07:14:16 -0400 (EDT) Date: Mon, 7 Jul 2008 12:14:16 +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: <200807071057.m67Av9WD014167@repoman.freebsd.org> Message-ID: <20080707121042.W63144@fledge.watson.org> References: <200807071057.m67Av9WD014167@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: cvs commit: src/sys/netinet udp_usrreq.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: Mon, 07 Jul 2008 11:14:18 -0000 On Mon, 7 Jul 2008, Robert Watson wrote: > rwatson 2008-07-07 10:56:55 UTC > > FreeBSD src repository > > Modified files: > sys/netinet udp_usrreq.c > Log: > SVN rev 180344 on 2008-07-07 10:56:55Z by rwatson > > First step towards parallel transmit in UDP: if neither a specific > source or a specific destination address is requested as part of a send > on a UDP socket, read lock the inpcb rather than write lock it. This > will allow fully parallel transmit down to the IP layer when sending > simultaneously from multiple threads on a connected UDP socket. > > Parallel transmit for more complex cases, such as when sendto(2) is > invoked with an address and there's already a local binding, will > follow. This change doesn't help the particularly interesting applications, such as named, etc, as they usually call sendto() with an address rather than connect() the UDP socket, but upcoming changes should address that. Once you get to the IP layer, the routing code shows up as a massive source of contention, and it would be great if someone wanted to work on improving concurrency for routing lookups. Re-introducing the route cache for inpcbs would also help the connect() case, but not the sendto() case, but is still a good idea as it would help TCP a *lot*. Once you get below the IP layer, contention on device driver transmit locks appears to be the next major locking-related performance issue. The UDP changes I'm in the throes of merging have lead to significant performance improvements for UDP applications, such as named and memcached, and hopefully can be MFC'd for 7.1 or 7.2. Robert N M Watson Computer Laboratory University of Cambridge