From owner-freebsd-questions Wed May 16 0:51:20 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 35D9037B422; Wed, 16 May 2001 00:51:11 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA22374; Wed, 16 May 2001 17:50:55 +1000 Date: Wed, 16 May 2001 17:49:37 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Dave Leimbach Cc: dleimbac@earthlink.net, wes@softweyr.com, freebsd-questions@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: Gettimeofday Again... In-Reply-To: <200105151440.JAA01279@MPI-Softtech.Com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 15 May 2001, Dave Leimbach wrote: > I think SMP is a way more important topic so long as gettimeofday doesn't get > called in thread context switches :).. This was mentioned before and the gettimeofday() (actually the internal kernel part of it) certainly does get called in thread context switches. This has a fairly small impact on context switching time. According to lmbench2 for 2 tiny processes (see my previous mail for some details on the machine): Linux 2.2.9 1 usec Linux 2.4.0.something 1 usec FreeBSD-4.0.something 1 usec FreeBSD-current 2 usec microtime() in the context switch takes about 0.4 usec. This accounts for about half of the pessimizations in SMPng according to the above measurements. But this may misleading since most of the times in the above are rounded to the nearest usec. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message