From owner-freebsd-arch@FreeBSD.ORG Sun Jun 1 21:58:01 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19FF01065674 for ; Sun, 1 Jun 2008 21:58:01 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id C2FCB8FC20 for ; Sun, 1 Jun 2008 21:58:00 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 9AB6E1CD58; Sun, 1 Jun 2008 23:57:59 +0200 (CEST) Date: Sun, 1 Jun 2008 23:57:59 +0200 From: Ed Schouten To: Julian Elischer Message-ID: <20080601215759.GN64397@hoeg.nl> References: <483EE7D5.5050408@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JjsO4Ft8DCMnlCnY" Content-Disposition: inline In-Reply-To: <483EE7D5.5050408@elischer.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: all mutexes -> read-write locks? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 21:58:01 -0000 --JjsO4Ft8DCMnlCnY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Julian, * Julian Elischer wrote: > it has been mentioned several times that through the evolution of the > locking primitives it has come to be that mutexes and exclusively =20 > acquired reader-writer locks are almost the same in terms of overhead > and that it might be a good move to define all mutexes to be > actually just that. > > this would allow people to slowly go through the system, catching low > hanging fruit by converting some of the mutex operations to reader > acquisitions wherever a writer is not required, thus reducing general =20 > system contention. > > Is there any thought on this? Last I heard jhb had confirmed that it > was feasible.. If this is going to be done, could we have mtx_* macro's pointing to the proper read/write ops? I know, it's just names, but I think most novice FreeBSD kernel hackers will almost instantaneously figure out what 'mtx' stands for. Why not make read/write locking a fundamental part of 'mtx' itself, if it doesn't introduce much overhead? --=20 Ed Schouten WWW: http://80386.nl/ --JjsO4Ft8DCMnlCnY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhDG2cACgkQ52SDGA2eCwUz2gCdHhsGROTLMI2oy36oYY0279QY 5OYAn1CCk4Zu//F6gCqWSlRQswz56w+E =gmMW -----END PGP SIGNATURE----- --JjsO4Ft8DCMnlCnY--