From owner-freebsd-arch@FreeBSD.ORG Thu Dec 18 20:14:05 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FA5218C; Thu, 18 Dec 2014 20:14:05 +0000 (UTC) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id E2C781ADC; Thu, 18 Dec 2014 20:14:04 +0000 (UTC) Received: from critter.freebsd.dk (unknown [192.168.60.3]) by phk.freebsd.dk (Postfix) with ESMTP id B844A3BD1A; Thu, 18 Dec 2014 20:14:02 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.9/8.14.9) with ESMTP id sBIKE2DN077372; Thu, 18 Dec 2014 20:14:02 GMT (envelope-from phk@phk.freebsd.dk) Subject: Re: Change default VFS timestamp precision? In-reply-to: <77322.1418933100@critter.freebsd.dk> From: "Poul-Henning Kamp" References: <201412161348.41219.jhb@freebsd.org> <70449.1418843354@critter.freebsd.dk> <201412181436.31701.jhb@freebsd.org> <77322.1418933100@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <77370.1418933642.1@critter.freebsd.dk> Date: Thu, 18 Dec 2014 20:14:02 +0000 Message-ID: <77371.1418933642@critter.freebsd.dk> Cc: "freebsd-arch@freebsd.org" , Adrian Chadd , Jilles Tjoelker X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 20:14:05 -0000 -------- In message <77322.1418933100@critter.freebsd.dk>, "Poul-Henning Kamp" writes: >>I don't understand >>why you think TSP_USEC is slower than TSP_NSEC. microtime() and nanotime() >>both just call bintime() and then convert the result using similar math. > >Because of the pointless nano->micro conversion which makes TSP_USEC >take a division longer to deliver a less precise result than TSP_NSEC. Actually, that's the other way around: it converts microseconds to nanoseconds with a pointless multiplication. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.