From owner-freebsd-current@FreeBSD.ORG Fri Oct 28 09:48:21 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B99E416A41F for ; Fri, 28 Oct 2005 09:48:21 +0000 (GMT) (envelope-from leafy7382@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4F0943D46 for ; Fri, 28 Oct 2005 09:48:20 +0000 (GMT) (envelope-from leafy7382@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so177990wxc for ; Fri, 28 Oct 2005 02:48:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GMXq1r0HruRhUaU8u0v0xx7NWqdBbm3Wx+SPcISDZz1VFo3aXssIXctpcJIeDVzyCEzTCFr0B6J2rwNHPmUDHETeW3tV3uDFB/VNRYvWtbUzc82sGlwzRSB17DceP7+RmK85WjHmWRLq/al6WaD0rmz+sORQaitx/Y85XH1sEBU= Received: by 10.65.145.13 with SMTP id x13mr20198qbn; Fri, 28 Oct 2005 02:48:19 -0700 (PDT) Received: by 10.65.105.11 with HTTP; Fri, 28 Oct 2005 02:48:19 -0700 (PDT) Message-ID: Date: Fri, 28 Oct 2005 17:48:19 +0800 From: Jiawei Ye To: Poul-Henning Kamp In-Reply-To: <30513.1130492612@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051028091016.GC3596@garage.freebsd.pl> <30513.1130492612@critter.freebsd.dk> Cc: Mark Kirkwood , Pawel Jakub Dawidek , David Xu , "Yuriy N. Shkandybin" , current@freebsd.org Subject: Re: Timers and timing, was: MySQL Performance 6.0rc1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2005 09:48:21 -0000 On 10/28/05, Poul-Henning Kamp wrote: > > By default the timecounter with the highest score is selected (but > negative scores are never selected automatically). > > You can override this with > sysctl kern.timecounter.hardware=3Dsomething > where something is one of the timecounters listed in kern.timecounter.cho= ice > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 This is what I get on a UP P4-1.8 -current system. No debugging enabled ker= nel. root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3DTSC kern.timecounter.hardware: ACPI-fast -> TSC root@chihiro:/home/leafy/tmp# ./a.out null function: 0.00794 getpid(): 0.94267 time(): 1.26512 gettimeofday(): 1.25332 root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3DACPI-fast kern.timecounter.hardware: TSC -> ACPI-fast root@chihiro:/home/leafy/tmp# ./a.out null function: 0.00796 getpid(): 0.94788 time(): 2.31868 gettimeofday(): 2.29598 root@chihiro:/home/leafy/tmp# sysctl kern.timecounter.hardware=3Di8254 kern.timecounter.hardware: ACPI-fast -> i8254 root@chihiro:/home/leafy/tmp# ./a.out null function: 0.00812 getpid(): 0.96921 time(): 5.01022 gettimeofday(): 5.01292 -- "Without the userland, the kernel is useless." --inspired by The Tao of Programming