From owner-freebsd-fs@FreeBSD.ORG Fri Feb 10 17:00:59 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10BAA1065672 for ; Fri, 10 Feb 2012 17:00:59 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m020-f182.google.com (mail-lpp01m020-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 88A0B8FC28 for ; Fri, 10 Feb 2012 17:00:58 +0000 (UTC) Received: by lbbgj3 with SMTP id gj3so2180875lbb.13 for ; Fri, 10 Feb 2012 09:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sNESFrb0qhyo4b1j8ulKCXBdbklCk1857SJ0Wo62P7M=; b=IQBk5Z4yfsnSi+cC3oSgyDo7IvKWGcY2Oc+CujozNvZOFNh3+irLKpzHGi3St+a42m CZRWdbp/iBN8qDut0P39bycg1kV2SZDHn45NyBPg17konsY8RlGYhkf7eTkrO9XgpN/G NnWJ9Uz0xP5AlAmSIrU5WOkIVEsiCA7MJhKHI= MIME-Version: 1.0 Received: by 10.152.110.102 with SMTP id hz6mr5050482lab.21.1328891851599; Fri, 10 Feb 2012 08:37:31 -0800 (PST) Received: by 10.152.18.4 with HTTP; Fri, 10 Feb 2012 08:37:31 -0800 (PST) In-Reply-To: <20120210135527.GR1860@hoeg.nl> References: <20120210135527.GR1860@hoeg.nl> Date: Fri, 10 Feb 2012 19:37:31 +0300 Message-ID: From: Sergey Kandaurov To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 Cc: fs@freebsd.org Subject: Re: Increase timestamp precision? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 17:00:59 -0000 On 10 February 2012 17:55, Ed Schouten wrote: > Hi all, > > It seems the default timestamp precision sysctl > (vfs.timestamp_precision) is currently set to 0 by default, meaning we > don't do any sub-second timestamps on files. Looking at the code, it > seems that vfs.timestamp_precision=1 will let it use a cached value with > 1 / HZ precision and it looks like it should have little overhead. > > Would anyone object if I were to change the default from 0 to 1? > [Yep, sorry I didn't read this mail before replying to your another mail.] I am for this idea. Increasing vfs.timestamp_precision will allow to use nanosecond precision for all those *stat() and *times() syscalls which operate on struct timespec. FWIW, NetBSD uses only nanotime() inside vfs_timestamp() since its initial appearance in 2006. -- wbr, pluknet