From owner-cvs-all Sun Jan 21 20:55:40 2001 Delivered-To: cvs-all@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id 6AAF437B402 for ; Sun, 21 Jan 2001 20:55:18 -0800 (PST) Received: (qmail 70418 invoked by uid 1142); 22 Jan 2001 04:55:17 -0000 Date: 21 Jan 2001 20:55:17 -0800 Date: Sun, 21 Jan 2001 15:14:15 -0800 From: Jason Evans To: Julian Elischer Cc: Jason Evans , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/include mutex.h src/sys/i386/includemutex.h src/sys/kern kern_mutex.c src/sys/net if.c src/sys/sysmutex.h Message-ID: <20010121151415.Y69199@canonware.com> References: <200101212234.f0LMYh716794@freefall.freebsd.org> <3A6B6581.E8FFB917@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A6B6581.E8FFB917@elischer.org>; from julian@elischer.org on Sun, Jan 21, 2001 at 02:41:05PM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 21, 2001 at 02:41:05PM -0800, Julian Elischer wrote: > Jason Evans wrote: > > Log: > > Move most of sys/mutex.h into kern/kern_mutex.c, thereby making the mutex > > inline functions non-inlined. Hide parts of the mutex implementation that > > should not be exposed. > > hmmm how much performance difference is there in doing this? > I presume that we lose the optimisation of gcc removing all the unused paths > and tests when the arguments include constants. (I guess this can be > regained by giving differnt kinds of mutexes different names.) > (haven't checked the files, hope I understand what was done correnctly) > > What is the reasoning? (not complaining, just curious) I don't really know whether this improves or hurts performance; it's main thrust was to fix a bug. However, we have immediate plans to revamp the mutex code so that it is (at least mostly) not inlined in order to reduce processor cache pressure, at the same time as cleaning up the mutex API, and this commit made some changes that were necessary for that work anyway. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message