From owner-freebsd-arch Thu Dec 2 12:14:38 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 7792F14EB9 for ; Thu, 2 Dec 1999 12:14:34 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id VAA19651 for ; Thu, 2 Dec 1999 21:14:29 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id VAA85148 for freebsd-arch@freebsd.org; Thu, 2 Dec 1999 21:14:29 +0100 (MET) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id C0D9F14EB9 for ; Thu, 2 Dec 1999 12:14:12 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40333>; Fri, 3 Dec 1999 07:06:19 +1100 Content-return: prohibited Date: Fri, 3 Dec 1999 07:13:46 +1100 From: Peter Jeremy Subject: Re: Threads stuff In-reply-to: <3846ADA5.72017F25@vigrid.com> To: eischen@vigrid.com, dcs@newsguy.com Cc: arch@freebsd.org Reply-To: peter.jeremy@alcatel.com.au Message-Id: <99Dec3.070619est.40333@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0pre3i Content-type: text/plain; charset=us-ascii References: <19991127223909.22A511FCF@io.yi.org> <3846A720.2BA461A6@newsguy.com> <3846ADA5.72017F25@vigrid.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1999-Dec-03 04:34:29 +1100, Daniel M. Eischen wrote: >"Daniel C. Sobral" wrote: >> Mmmm... I though gettimeofday() was a very slow system call... I'll >> have to check that. ... >Not to say that clock_gettime is any better, On my PII-266, clock_gettime(CLOCK_REALTIME) takes 2.48usec and gettimeofday() takes 2.42usec - slightly better. Interestingly, in both cases about 30% of the time is charged as user rather than system - which suggests that either the kernel->user return is quite slow[*], or something odd is going on. I wouldn't consider either particularly slow (unless you count the clock cycles taken - around 650). Peter [*] Since the kernel entry and kernel exit are non-interruptable, any profiling interrupt will be delayed until the instruction is complete. Thus the kernel entry will be charged to the system, and the exit will be charged to the user. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message