From owner-svn-src-all@FreeBSD.ORG Fri Jun 22 07:34:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4397C106566C; Fri, 22 Jun 2012 07:34:58 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id CD8058FC0A; Fri, 22 Jun 2012 07:34:57 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q5M7YuVn032715; Fri, 22 Jun 2012 09:34:56 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q5M7YuwM032714; Fri, 22 Jun 2012 09:34:56 +0200 (CEST) (envelope-from marius) Date: Fri, 22 Jun 2012 09:34:56 +0200 From: Marius Strobl To: Konstantin Belousov Message-ID: <20120622073455.GE69382@alchemy.franken.de> References: <201206220713.q5M7DVH0063098@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206220713.q5M7DVH0063098@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237434 - in head/lib/libc: amd64/sys gen i386/sys include sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 07:34:58 -0000 On Fri, Jun 22, 2012 at 07:13:31AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Jun 22 07:13:30 2012 > New Revision: 237434 > URL: http://svn.freebsd.org/changeset/base/237434 > > Log: > Use struct vdso_timehands data to implement fast gettimeofday(2) and > clock_gettime(2) functions if supported. The speedup seen in > microbenchmarks is in range 4x-7x depending on the hardware. > > Only amd64 and i386 architectures are supported. Libc uses rdtsc and > kernel data to calculate current time, if enabled by kernel. I don't know much about x86 CPUs but is my understanding correct that TSCs are not synchronized in any way across CPUs, i.e. reading it on different CPUs may result in time going backwards etc., which is okay for this application though? Marius