From owner-cvs-src-old@FreeBSD.ORG Sun Mar 8 21:48:34 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2665106566C for ; Sun, 8 Mar 2009 21:48:34 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CFC018FC16 for ; Sun, 8 Mar 2009 21:48:34 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n28LmYBI034259 for ; Sun, 8 Mar 2009 21:48:34 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n28LmYZ8034258 for cvs-src-old@freebsd.org; Sun, 8 Mar 2009 21:48:34 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200903082148.n28LmYZ8034258@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Sun, 8 Mar 2009 21:48:29 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_witness.c uipc_usrreq.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2009 21:48:35 -0000 rwatson 2009-03-08 21:48:29 UTC FreeBSD src repository Modified files: sys/kern subr_witness.c uipc_usrreq.c Log: SVN rev 189544 on 2009-03-08 21:48:29Z by rwatson Decompose the global UNIX domain sockets rwlock into two different locks: a global list/counter/generation counter protected by a new mutex unp_list_lock, and a global linkage rwlock, unp_global_rwlock, which protects the connections between UNIX domain sockets. This eliminates conditional lock acquisition that was previously a property of the global lock being held over sonewconn() leading to a call to uipc_attach(), which also required the global lock, but couldn't rely on it as other paths existed to uipc_attach() that didn't hold it: now uipc_attach() uses only the list lock, which follows the linkage lock in the lock order. It may also reduce contention on the global lock for some workloads. Add global UNIX domain socket locks to hard-coded witness lock order. MFC after: 1 week Discussed with: kris Revision Changes Path 1.267 +2 -0 src/sys/kern/subr_witness.c 1.226 +96 -102 src/sys/kern/uipc_usrreq.c