From owner-cvs-all@FreeBSD.ORG Thu Jul 29 20:08:54 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 ABA3016A4CE; Thu, 29 Jul 2004 20:08:54 +0000 (GMT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CFD043D5A; Thu, 29 Jul 2004 20:08:54 +0000 (GMT) (envelope-from alc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id 56E0B4AC46; Thu, 29 Jul 2004 15:08:42 -0500 (CDT) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 10177-01-43; Thu, 29 Jul 2004 15:08:42 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id ECFF54AA21; Thu, 29 Jul 2004 15:08:41 -0500 (CDT) Date: Thu, 29 Jul 2004 15:08:41 -0500 From: Alan Cox To: Robert Watson Message-ID: <20040729200841.GF18577@cs.rice.edu> References: <20040729131040.F32601@pooker.samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Virus-Scanned: by amavis-20030616-p7 at cs.rice.edu 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 20:08:54 -0000 On Thu, Jul 29, 2004 at 03:41:03PM -0400, Robert Watson wrote: > On Thu, 29 Jul 2004, Scott Long wrote: > > > > - Enable recursion on the page queues lock. This allows calls to > > > vm_page_alloc(VM_ALLOC_NORMAL) and UMA's obj_alloc() with the page > > > queues lock held. Such calls are made to allocate page table pages > > > and pv entries. > > > > 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? > > No opinion on the change itself, but just to clarify this wording a little > for those reading who don't follow the locking work blow-by-blow: flagging > a mutex as recursive itself is not expensive, but the act of recursing the > mutex is expensive. > I've benchmarked these changes on alpha, amd64 and i386 under buildworld. The overhead is small. Also, recursion on the mutex will be rare, occurring under conditions of an empty or near-empty free list. Alan