From owner-cvs-all@FreeBSD.ORG Sun Nov 16 11:45:46 2003 Return-Path: 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 9A48216A4D0 for ; Sun, 16 Nov 2003 11:45:46 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 7BBB043FAF for ; Sun, 16 Nov 2003 11:45:44 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 57509 invoked by uid 1000); 16 Nov 2003 19:45:45 -0000 Date: Sun, 16 Nov 2003 11:45:45 -0800 (PST) From: Nate Lawson To: Luigi Rizzo In-Reply-To: <20031116003939.A10853@xorpc.icir.org> Message-ID: <20031116114258.V57495@root.org> References: <200311142102.hAEL2Nen073186@repoman.freebsd.org> <3FB593F5.1053E7E2@pipeline.ch><3FB60181.4256A519@pipeline.ch> <20031116003939.A10853@xorpc.icir.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in_var.h ip_fastfwd.c ip_flow.c ip_flow.h ip_input.c ip_output.c src/sys/sys mbuf.h src/sys/conf files src/sys/net if_arcsubr.c if_ef.c if_ethersubr.c if_fddisubr.c if_ X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2003 19:45:46 -0000 On Sun, 16 Nov 2003, Luigi Rizzo wrote: > On Sun, Nov 16, 2003 at 12:48:14PM +1100, Peter Jeremy wrote: > ... > > >I will try to measure that with more precision. You did have > > >code which was able to record and timestamp events several > > >thousand times per second. Do still have that code somewhere? > > there is some MD code in the RELENG_4 tree, the kernel option > you need is "options KERN_TIMESTAMP" and a description on how > to use it is in sys/i386/include/param.h > > Note that you have to be careful when timing very short sections > of code, because the CPU can execute instruction out of order > so something like > > rdtsc(); > > rdtsc() > > might result in the second timing call being executed before > the section of code in the middle is complete. There is > some nonintuitive instruction (which i now forget) to flush the > execution pipeline which can be used around the section of > code you want to time. cpuid -Nate