Received: by 10.213.65.68 with SMTP id h4csp265517imn; Fri, 16 Mar 2018 02:21:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELvXjXRgOafbdYC8IlUn4nS2JSkZQn+4NazNDzn/iDIOs7cCxOLXExHGAyvMtjJJZVXMRBts X-Received: by 10.99.126.72 with SMTP id o8mr919728pgn.256.1521192074815; Fri, 16 Mar 2018 02:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521192074; cv=none; d=google.com; s=arc-20160816; b=qkFiO4Y+VIoPfFDd+RpkKX/4/InYvbgAfoXb5JIifNeVeFkb35HZLcmoVw8cV7hJa8 3MkKmctCCP8zDq1IZdewNdfhZxUes0TsmitY/3Lxbk+UzPcSXaPb7DLdqGuciUiFqfx6 OgQ6MbWuT2c1f+tHSiFzGYfyXHQsJoDCAzN177KBJC0FEymIx+aCKas5WGiwM0ZHKI8i NnkFqqmiy1axr3uGziJq2Wm+pNGOb6MXrueUm8YAJehV7aX2AyrgIVa4fMPj9ertcuR3 xNoYAckG/9u2Mctd5Dd+v4NZL6873UNCjxteRY1Q7oHiOzvlQO+mQq0tOZ6VYipeUFOb j50g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=tfvHMBG7HrPQGOVVa6CQdY3FWCIA9LVj2Aj8ZDrJoIM=; b=fkis7NCftzaKjU9DCvhKOKuF15Dep6Kp050QJrhfdqcfV5vlUne5JHFCrN0Zg9J9JL LdRmSzZTIWhZ4OXWvbvi/w2VjJ1C+VQTuRl58IDQXvCAt4kyg2FuFx9BSfvNu4opiUeM +wmBVgemR3LbYKb8GFDsiE58drpu0Y1lrbSRIxQItFBLbjDJeVNv6Ugfynnkiu/f9plt MDFvpqaRk3gjbZVow1/JH+7u1oBQi/Sf+WN+55d3Wsa+DhW+jV9RQYna0XpbNwjBgWdL KOm//HSzGDdwvgUWMq0ALAO+mMkOlo+VV12zqCSqL4+mj3rnsuT95P8V9o+GwNe/muoV WUeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=lrFZRzRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14-v6si5824635plj.10.2018.03.16.02.21.00; Fri, 16 Mar 2018 02:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=lrFZRzRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbeCPJT2 (ORCPT + 99 others); Fri, 16 Mar 2018 05:19:28 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:38337 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751724AbeCPJTZ (ORCPT ); Fri, 16 Mar 2018 05:19:25 -0400 Received: by mail-qt0-f194.google.com with SMTP id n12so10151378qtl.5; Fri, 16 Mar 2018 02:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=tfvHMBG7HrPQGOVVa6CQdY3FWCIA9LVj2Aj8ZDrJoIM=; b=lrFZRzRdiJUAKFuHwnK8zz+OoChfCoaPLzE/i9Z6xMRJVtmPgCSTkb6l8gLJrpjsgT 9okZC94HN/xHQ4xp6M6NT0AGMXsIZ/z8h7ojHnLpVet9sVJtNLdms6xEOMP0mPJDpkbh Cg+4h7KAi7XPlqfH0QlAAX0bzmF6DvaDmw1nmPZ5IWsFYiJvHZDiUAMafNlArXJwYrZy 7Z1rXcgluJQ93otqd+Z+utgsp5QZFMmCeXUeOPhUcmSc21VN4X0XPy0vDlnhuhbeKwtO WPsvJiaebC+ZNvX6JvDyqSDFQHH8RO8t0lArQvhEawHJGT+1Buw8xOCM7+VrpDTFlLBI MnEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=tfvHMBG7HrPQGOVVa6CQdY3FWCIA9LVj2Aj8ZDrJoIM=; b=O7h09WkXo7MkOf8kVwdMUfi45U/jSFOiraTm5oDNjgmOIpAFMR4EcA9KtOLFfpBcqb oRz/3VHL/a50XrmC8Kt2tQ66O2Yh1Px0aPE+9f9mI+foCBeXyH5UgZQTvm8ZBf39tFVA SXiAEvG5HW4sU1d/rrctyUkisQd0MNbJk1dvS7N28itbevEHiuMIbpZD1A6+81q+9zFP Sw5O+zDQ1nb4RFS2twMlFiQrp4npmM0q0OtuYGNj45cocqB0G/6N1A5mMqR1AH81xmGr vicV4RgjwQOgAAeG3AwKtv94ETc8g8CzIDJ6upX3v/Z6jX9vJpNRa0xH6nwR6aRhw+ts DVqA== X-Gm-Message-State: AElRT7FdoLiIDSdn4NCmn04c46QcwL8Q4UpgHXFc8QeB0aLC0K82wwgg XLfptFQ2fWPLg8RRI5BrO+mqZm6asckawvvlT8E= X-Received: by 10.200.47.26 with SMTP id j26mr1482652qta.185.1521191964381; Fri, 16 Mar 2018 02:19:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.46 with HTTP; Fri, 16 Mar 2018 02:19:23 -0700 (PDT) In-Reply-To: <20180316025928.GB2254@thunk.org> References: <1520705944-6723-1-git-send-email-jix024@eng.ucsd.edu> <1520705944-6723-4-git-send-email-jix024@eng.ucsd.edu> <20180315045401.GB4860@magnolia> <20180316025928.GB2254@thunk.org> From: Arnd Bergmann Date: Fri, 16 Mar 2018 10:19:23 +0100 X-Google-Sender-Auth: dABPn5PvPKRRw_z-Hx3RaFS8LD8 Message-ID: Subject: Re: [RFC v2 03/83] Add super.h. To: "Theodore Y. Ts'o" , Arnd Bergmann , Andiry Xu , "Darrick J. Wong" , Linux FS Devel , Linux Kernel Mailing List , "linux-nvdimm@lists.01.org" , Dan Williams , "Rudoff, Andy" , coughlan@redhat.com, Steven Swanson , Dave Chinner , Jan Kara , swhiteho@redhat.com, miklos@szeredi.hu, Jian Xu , Andiry Xu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 3:59 AM, Theodore Y. Ts'o wrote: > On Thu, Mar 15, 2018 at 09:38:29PM +0100, Arnd Bergmann wrote: >> >> You could also have a resolution of less than a nanosecond. Note >> that today, the file time stamps generated by the kernel are in >> jiffies resolution, so at best one millisecond. However, most modern >> file systems go with the 64+32 bit timestamps because it's not all >> that expensive. > > It actually depends on the architecture and the accuracy/granularity > of the timekeeping hardware available to the system, but it's possible > for the granularity of file time stamps to be up to one nanosecond. > So you can get results like this: > > % stat unix_io.o > File: unix_io.o > Size: 55000 Blocks: 112 IO Block: 4096 regular file > Device: fc01h/64513d Inode: 19931278 Links: 1 > Access: (0644/-rw-r--r--) Uid: (15806/ tytso) Gid: (15806/ tytso) > Access: 2018-03-15 18:09:21.679914182 -0400 > Modify: 2018-03-15 18:09:21.639914089 -0400 > Change: 2018-03-15 18:09:21.639914089 -0400 Note how the nanoseconds only differ in digits 2, 7, 8, and 9 though: The atime update happened 4 jiffies (at HZ=100) after the mtime, the low digits are presumably jitter or ntp adjustments. This is the result of current_time() using the plain tk_xtime rather than reading the highres clocksource as ktime_get_real_ts64() does. This was a performance optimization a long time ago. We could make the current_time() behavior configurable if we want though, e.g. at compile time, or as a per-mount option. It's probably more common these days to have a highres clocksource that can be read efficiently than it was back when current_fs_time() was first introduced. Arnd