From owner-cvs-all Fri Aug 16 10:25:15 2002 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 D448137B401; Fri, 16 Aug 2002 10:25:11 -0700 (PDT) Received: from root.com (unknown [209.102.106.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0445943E42; Fri, 16 Aug 2002 10:25:11 -0700 (PDT) (envelope-from dg@root.com) Received: (from dg@localhost) by root.com (8.11.2/8.11.2) id g7GHGDY52877; Fri, 16 Aug 2002 10:16:13 -0700 (PDT) (envelope-from dg) Date: Fri, 16 Aug 2002 10:16:13 -0700 From: David Greenman-Lawrence To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_socket2.c Message-ID: <20020816101613.I42978@nexus.root.com> References: <20020815221609.E42978@nexus.root.com> <20020816212205.N6756-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020816212205.N6756-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Aug 16, 2002 at 10:21:59PM +1000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> I'm looking at calcru() as well, since is does four 64bit divides and >> was as expensive as sbreserve() in my profiles. The __qdivrem function >> that does the 64bit divide appears to consume several thousand instructions >> in the common case. Something to avoid if at all possible. > >calcru() didn't seem to be so bad in my profiles. I think its efficiency >only matters if you have a lot of very short lived processes, or if you >have processes that call getrusage() too much. In my particular tests, processes had a lifetime of less than 10us (i.e. were forking + exiting at a rate of > 10000/second). This was an app that creates a process, does a TCP network connect, receives and processes a packet of data, and sends a response - a typical transaction oriented network application. -DG D.G.Lawrence Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 TeraSolutions, Inc. - http://www.terasolutions.com - (503) 288 9544 The FreeBSD Project - http://www.freebsd.org Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message