From owner-freebsd-arch@FreeBSD.ORG Fri Dec 19 17:28:10 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 618D0B60; Fri, 19 Dec 2014 17:28:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF1A22AB; Fri, 19 Dec 2014 17:28:10 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BC505B97F; Fri, 19 Dec 2014 12:28:08 -0500 (EST) From: John Baldwin To: Poul-Henning Kamp Subject: Re: Change default VFS timestamp precision? Date: Fri, 19 Dec 2014 10:28:02 -0500 Message-ID: <7567696.mqJ3jgzJgL@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <77371.1418933642@critter.freebsd.dk> References: <201412161348.41219.jhb@freebsd.org> <77322.1418933100@critter.freebsd.dk> <77371.1418933642@critter.freebsd.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 19 Dec 2014 12:28:08 -0500 (EST) 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: Fri, 19 Dec 2014 17:28:10 -0000 On Thursday, December 18, 2014 08:14:02 PM Poul-Henning Kamp wrote: > -------- > > 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. Yes, and multiplication is cheaper than division. It's not a power of two (so more than a single bitshift), but possibly in the noise compared to the work in bintime() itself. -- John Baldwin