From owner-cvs-all Sun Jan 21 17:36:48 2001 Delivered-To: cvs-all@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id 4F76A37B402; Sun, 21 Jan 2001 17:36:20 -0800 (PST) Received: from laptop.baldwin.cx (john@dhcp150.geekhouse.net [192.168.1.150]) by moby.geekhouse.net (8.11.0/8.9.3) with ESMTP id f0M1ehs78892; Sun, 21 Jan 2001 17:40:43 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3A6B6581.E8FFB917@elischer.org> Date: Sun, 21 Jan 2001 17:36:15 -0800 (PST) From: John Baldwin To: Julian Elischer Subject: Re: cvs commit: src/sys/alpha/include mutex.h src/sys/i386/inclu Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jason Evans Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 21-Jan-01 Julian Elischer wrote: > Jason Evans wrote: >> >> jasone 2001/01/21 14:34:43 PST >> >> Modified files: >> sys/alpha/include mutex.h >> sys/i386/include mutex.h >> sys/kern kern_mutex.c >> sys/net if.c >> sys/sys mutex.h >> 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) The flags are going away most likely in the future, resulting in only 1 runtime check to see if the mutex is a spin or sleep mutex. > What is the reasoning? (not complaining, just curious) Inlining all of these can bloat the kernel unfortunately. Jason estimated 650kb of extra code in a non-debug kernel from this when we hit 5.0. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message