From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 14:31:55 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 810E416A41A for ; Tue, 22 Jan 2008 14:31:55 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 3CAAB13C4EB for ; Tue, 22 Jan 2008 14:31:55 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id EFE8B1B10EFD; Tue, 22 Jan 2008 15:31:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, MIME_8BIT_HEADER autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 52B1D1B10C26; Tue, 22 Jan 2008 15:31:48 +0100 (CET) Message-ID: <4795FE54.9090606@moneybookers.com> Date: Tue, 22 Jan 2008 16:31:48 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no> In-Reply-To: <864pd63v2h.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV 0.91.2/5519/Tue Jan 22 05:46:17 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-hackers@FreeBSD.org Subject: Re: gettimeofday() in hping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 14:31:55 -0000 Greetings, Dag-Erling Sm=C3=B8rgrav wrote: > Dag-Erling Sm=C3=B8rgrav writes: > =20 >> Stefan Lambrev writes: >> =20 >>> I tried clock_gettime() (using CLOCK_REALTIME for clock_id), but this= >>> yield worse performance. >>> =20 >> Try CLOCK_MONOTONIC instead. >> =20 > > I forgot - there are also the FreeBSD-specific CLOCK_REALTIME_FAST and > CLOCK_MONOTONIC_FAST if you can live with a little bit of jitter. > > DES > =20 Thanks for your reply. I tested all different combination. The performance change is almost=20 invisible (100-200KB/s), and can't be compared with the performance boost that TSC gain over=20 ACPI-fast timecounter. Unfortunately TSC doesn't play nice with power saving modes. --=20 Best Wishes, Stefan Lambrev ICQ# 24134177