From owner-cvs-all@FreeBSD.ORG Thu Jul 29 19:52:04 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F200416A4CE; Thu, 29 Jul 2004 19:52:03 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97A9A43D31; Thu, 29 Jul 2004 19:52:03 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 0CB2AACBD2; Thu, 29 Jul 2004 21:51:56 +0200 (CEST) Date: Thu, 29 Jul 2004 21:51:56 +0200 From: Pawel Jakub Dawidek To: Robert Watson Message-ID: <20040729195156.GA57678@darkness.comp.waw.pl> References: <20040729131040.F32601@pooker.samsco.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oFGQ2VdWvpciDCpb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: Alan Cox cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Scott Long cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/alpha/alpha pmap.c src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c src/sys/vm vm_page.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 29 Jul 2004 19:52:04 -0000 --oFGQ2VdWvpciDCpb Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 29, 2004 at 03:41:03PM -0400, Robert Watson wrote: +> On Thu, 29 Jul 2004, Scott Long wrote: +>=20 +> > > - Enable recursion on the page queues lock. This allows calls to +> > > vm_page_alloc(VM_ALLOC_NORMAL) and UMA's obj_alloc() with the p= age +> > > queues lock held. Such calls are made to allocate page table p= ages +> > > and pv entries. +> >=20 +> > My understanding is that recursive mutexes are quite expensive. Is +> > recursion a common occurrance now, and is there a good way to +> > profile/measure these paths?=20 +>=20 +> No opinion on the change itself, but just to clarify this wording a litt= le +> for those reading who don't follow the locking work blow-by-blow: flaggi= ng +> a mutex as recursive itself is not expensive, but the act of recursing t= he +> mutex is expensive.=20 Hmm, why? Code seems to be very simple, I would even risk: simpler than when lock is obtained at first time (but still one atomic operation...). I'm not saying here that you don't know what you're talking about, I'm just looking for an explanation. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --oFGQ2VdWvpciDCpb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBCVVcForvXbEpPzQRAtGeAKDWT3zxgleF2FSSAm23q6kfk7MD3gCgqo3O qwBKArJZ9Ev5mOS2epSD/7w= =zhgz -----END PGP SIGNATURE----- --oFGQ2VdWvpciDCpb--