From owner-freebsd-hackers Sun Nov 16 20:04:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA08430 for hackers-outgoing; Sun, 16 Nov 1997 20:04:32 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from anlsun.ebr.anlw.anl.gov (anlsun.ebr.anlw.anl.gov [141.221.1.2]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id UAA08423 for ; Sun, 16 Nov 1997 20:04:28 -0800 (PST) (envelope-from cmott@srv.net) Received: from darkstar.home (dialin1.anlw.anl.gov [141.221.254.101]) by anlsun.ebr.anlw.anl.gov (8.6.11/8.6.11) with SMTP id VAA17938; Sun, 16 Nov 1997 21:04:18 -0700 Date: Sun, 16 Nov 1997 21:03:44 -0700 (MST) From: Charles Mott X-Sender: cmott@darkstar.home To: "Jamil J. Weatherbee" cc: Joerg Wunsch , hackers@FreeBSD.ORG Subject: Re: Reading kernel memory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 16 Nov 1997, Jamil J. Weatherbee wrote: > > > Does anyone know what the response time for gettimeofday() is on a > > reasonably modern Pentium? It is about 60 microseconds on my ancient 386. > > I wrote some test code for this, included below. > > My results (as measured by this code) > > Machine Calls Latency > > PPro-180 999998 4.06us > Nexgen P-100 999977 23.92us > Pentium-100 999987 4.81us > Cyrix-PR166 999996 5.82us > > I guess that kinda says something bad about that NexGen machine I used to > test the AIOX driver, mainly that it is slow, which for testing I guess is > kinda good. Maybye it is just slower in the call gate or something because > computational I think it is a bit faster than the Pentium 100 (at least > that is my experience with the equally equipped machines). That's interesting -- P100 and PPro 180 times are about the same. Gettimeofday() is mostly context switching I suppose although there are (I am guessing) 50 or so machine language instructions in microtime(). As far as the Nexgen, there are some Pentium optimizations in microtime() which it could be doing very slowly in microcode, or maybe context switch time is just lousy or maybe you were running something else on your Nexgen. Thanks for the feedback. Charles Mott