From owner-cvs-src@FreeBSD.ORG Tue May 15 12:21:44 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 887A616A40A; Tue, 15 May 2007 12:21:44 +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 2608413C46C; Tue, 15 May 2007 12:21:43 +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 E046446FB0; Tue, 15 May 2007 08:21:41 -0400 (EDT) Date: Tue, 15 May 2007 13:21:41 +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: <200705031442.l43Egggi064069@repoman.freebsd.org> Message-ID: <20070515131403.E69080@fledge.watson.org> References: <200705031442.l43Egggi064069@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: cvs commit: src/sys/kern uipc_debug.c uipc_sockbuf.c uipc_socket.c uipc_syscalls.c src/sys/netinet sctputil.c src/sys/sys socketvar.h 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: Tue, 15 May 2007 12:21:44 -0000 On Thu, 3 May 2007, Robert Watson wrote: > sblock() implements a sleep lock by interlocking SB_WANT and SB_LOCK flags > on each socket buffer with the socket buffer's mutex. This sleep lock is > used to serialize I/O on sockets in order to prevent I/O interlacing. > > This change replaces the custom sleep lock with an sx(9) lock, which > results in marginally better performance, better handling of contention > during simultaneous socket I/O across multiple threads, and a cleaner > separation between the different layers of locking in socket buffers. > Specifically, the socket buffer mutex is now solely responsible for > serializing simultaneous operation on the socket buffer data structure, > and not for I/O serialization. > > While here, fix two historic bugs: > > (1) a bug allowing I/O to be occasionally interlaced during long I/O > operations (discovere by Isilon). > > (2) a bug in which failed non-blocking acquisition of the socket buffer > I/O serialization lock might be ignored (discovered by sam). > > SCTP portion of this patch submitted by rrs. Just an update on this change: (1) Kris has confirmed 10% performance improvements in MySQL and pgsql on his test configuration. (2) Fixes for the signal issue reported by Alfred are available, and I'm currently waiting for John to review Attilio's sx_.*_sig() patch before I can commit them. Robert N M Watson Computer Laboratory University of Cambridge