From owner-cvs-all@FreeBSD.ORG Mon Feb 26 20:47:53 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AFFF16A404; Mon, 26 Feb 2007 20:47:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 4AD2413C4AC; Mon, 26 Feb 2007 20:47:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1QKlr0G088724; Mon, 26 Feb 2007 20:47:53 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1QKlqjA088711; Mon, 26 Feb 2007 20:47:52 GMT (envelope-from rwatson) Message-Id: <200702262047.l1QKlqjA088711@repoman.freebsd.org> From: Robert Watson Date: Mon, 26 Feb 2007 20:47:52 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys unpcb.h src/sys/kern uipc_usrreq.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 20:47:53 -0000 rwatson 2007-02-26 20:47:52 UTC FreeBSD src repository Modified files: sys/sys unpcb.h sys/kern uipc_usrreq.c Log: Revise locking strategy used for UNIX domain sockets in order to improve concurrency: - Add per-unpcb mutexes protecting unpcb connection state, fields, etc. - Replace global UNP mutex with a global UNP rwlock, which will protect the UNIX domain socket connection topology, v_socket, and be acquired exclusively before acquiring more than per-unpcb at a time in order to avoid lock order issues. In performance measurements involving MySQL, this change has little or no overhead on UP (+/- 1%), but leads to a significant (5%-30%) improvement in multi-processor measurements using the sysbench and supersmack benchmarks. Much testing by: kris Approved by: re (kensmith) Revision Changes Path 1.197 +468 -222 src/sys/kern/uipc_usrreq.c 1.22 +1 -0 src/sys/sys/unpcb.h