Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp518289rdh; Sat, 23 Sep 2023 23:31:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqRcwRfgvqlbkOzTPu27NE7R/jVc6oIbjvwBvK4gUUBzXtGpN+WG0dY7OegYHkcAzFpPkD X-Received: by 2002:a92:c248:0:b0:34c:e84b:4c5c with SMTP id k8-20020a92c248000000b0034ce84b4c5cmr5508652ilo.27.1695537076738; Sat, 23 Sep 2023 23:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695537076; cv=none; d=google.com; s=arc-20160816; b=ddCYLkRh13bXES3ze7VOqhcywDyDs1banq94Z1anuHF0PdtgsCl7/J9DgEhF7+mDOw ATbBMaRsw8dLzYRk8s0qXOgObiOSWlMELyKK9alIDQ+xUbstYfGe9DQC0QYoL9cNr5dN af7kFqGbMj9DkF4qDOG2htjfDvROVrlHH4SOg60OmIeFgIsl7KUKN5GU7/+Dlgf6CfcQ mNoJ37hBZkqedgWMJPxEm81QASZAME6oNr1mxAbBG971uQLU+cZCerC4anky3wvYEBZ/ hCgvYZuM0uVpFEl3Bemrf0Gcj3vFcxZ4T4gHkXTvzXuOKIWLW9oI2feTtL57NKfnbyNG kF0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=g3Je4TNRe1YIR75V+qdWRX7Igoi+hFtPHeeYUIcHIZM=; fh=XQuXYQWv47k+TzlDPlsrPuBA9mO0swHzZHP8zyGrIr4=; b=w1+BcCJlKg/DWwVvWuWe2z16z1kAGQcnBuQTJ6yn6neTzhdDKhaMKtJtfd+dSK3ZQh HozQPKnnQVNUEPa+3ys7+eXOkwG2f7dL6G7HerNqDom3PcaNAPoSwlNynM/sycD6K/v0 QiupSh1bBO3c/Q5TXtZqPtbUuaNnOa0isN512mZyd/FnKrCuoPWQrR7FNCUu4Ki3k6Z5 Ly8QBol9z65vjWedldSD0dSc+9zKfeRKEFLsIOh32dLHAu/p0zPH7QGZjR74biY0KZQS bV/6zyHO4CWy+ajDzuwwrLWxAjtjWT4mFa9/mFdMDWPAa/sd9vrTbr/ZkdYC4sLCAPrx gj0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UwzTCGcW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z16-20020a656650000000b0057787e286c4si6526091pgv.680.2023.09.23.23.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 23:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UwzTCGcW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D85B880DF257; Sat, 23 Sep 2023 14:49:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbjIWV34 (ORCPT + 99 others); Sat, 23 Sep 2023 17:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjIWV34 (ORCPT ); Sat, 23 Sep 2023 17:29:56 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A172124; Sat, 23 Sep 2023 14:29:50 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7740cedd4baso246394685a.2; Sat, 23 Sep 2023 14:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695504589; x=1696109389; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g3Je4TNRe1YIR75V+qdWRX7Igoi+hFtPHeeYUIcHIZM=; b=UwzTCGcWTw0vFwp+U6gnv7Sn+Lg+uMSQ642cOFmEEONVUgek3dm/RfNafQOrvN5/rz t/4vaMf9iLp7PvifBV7qp6v+yMPMAuH7qLj0fJ3dI9QXfHSpwloD7ECXAMrNFG7hMqd0 ErsEzZ9qWXDbyiRoWFIFJiTy0He5ER7eYSkfkhefwKBRW28rZDQ+nFy1XweW+zEeflv6 FfAWD9nW9Ja9i2auZMx6LERUvkoR9G6MF8xD5D0yoYp7Sr9dpbX4UFlQ70RjzqXhWrs0 51+SuOHizKr3I3tKDp/W1dHwr5DGCz3kbYYwi9sjFSji3Q0CiBMsSv4XUCUu2AEDWIn6 F9Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695504589; x=1696109389; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g3Je4TNRe1YIR75V+qdWRX7Igoi+hFtPHeeYUIcHIZM=; b=KPT5WjGkqJU0t3Kdz6d3O78KDnYfhgnPgj55gaamk5nhHeBJc4he9X9WEvNEvlNxUD EEXDDKhLr+N4Guwq+xjiK6X7syJ+IjrPUCFizumNR9hEl5pElyu9vrzBRN0Q83ch+lmp 7itqgBuQixdYiNuFUFygTGo0yY9DCMAcgicp6Aj+FoBubwB2uCc+eq3QGPM799ysujC4 Tsy8+vSptgSW6yPAeZPKEh9PJvtitRaon1DJTsrDtXl4y9jZdXY3aj8L/XWKuJxfGRh7 kfpcSeLQ0SoCpAaeMDrMD+zafI1uZoh5sFgSmU+7LnpW2UNRzERt1KpjA0fqz5TwoqI5 ZDYg== X-Gm-Message-State: AOJu0YzkV2ka1QOTFF1ElINp5PpHczx60nZzXWldj1C2aUBM7i1Q/ZSk Ha07ZcrvwP5TMUBfH8MamMj2zrS3PXkuthYrg6FHeBnR59Q= X-Received: by 2002:a05:620a:40c5:b0:76e:fea0:3f3e with SMTP id g5-20020a05620a40c500b0076efea03f3emr3400849qko.48.1695504589098; Sat, 23 Sep 2023 14:29:49 -0700 (PDT) MIME-Version: 1.0 References: <20230921-umgekehrt-buden-a8718451ef7c@brauner> <0d006954b698cb1cea3a93c1662b5913a0ded3b1.camel@kernel.org> In-Reply-To: From: Amir Goldstein Date: Sun, 24 Sep 2023 00:29:37 +0300 Message-ID: Subject: Re: [GIT PULL v2] timestamp fixes To: Linus Torvalds Cc: Jeff Layton , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , "Darrick J. Wong" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 14:49:23 -0700 (PDT) On Sat, Sep 23, 2023 at 8:49=E2=80=AFPM Linus Torvalds wrote: > > On Fri, 22 Sept 2023 at 23:36, Amir Goldstein wrote: > > > > Apparently, they are willing to handle the "year 2486" issue ;) > > Well, we could certainly do the same at the VFS layer. > > But I suspect 10ns resolution is entirely overkill, since on a lot of > platforms you don't even have timers with that resolution. > > I feel like 100ns is a much more reasonable resolution, and is quite > close to a single system call (think "one thousand cycles at 10GHz"). > You are right. 100ns is enough resolution for fs timestamps, but: 1. We cannot truncate existing timestamps on existing files that are stored in 1ns format even if the 100ns remainder is garbage, applications depend on tv_nsec not changing, so if vfs truncates to 100ns, filesystems will need to carry the remainder anyway. 2. The whole idea behind multigrain time is that the 100ns remainder space is available in on-disk timestamps formats and is not going away, so better not let it go to waste on garbage and use is for "change cookie". > > But the resolution change is counter to the purpose of multigrain > > timestamps - if two syscalls updated the same or two different inodes > > within a 100ns tick, apparently, there are some workloads that > > care to know about it and fs needs to store this information persistent= ly. > > Those workloads are broken garbage, and we should *not* use that kind > of sh*t to decide on VFS internals. > Sorry, I phrased it completely wrong. The workloads don't expect 1ns resolution. The workloads just compare timestamps of objects and expect some sane not-before ordering rules. If user visible timestamps are truncated to 100ns all is good. > End result: we should ABSOLUTELY NOT have as a target to support some > insane resolution. This is not the target. I think the target is explained well in this new v8 revision [1] of the patch set which does exactly what you promote - it hides the insane resolution in fs timestamps from users. Thanks, Amir. [1] https://lore.kernel.org/linux-fsdevel/CAOQ4uxjGofKT2LcM_YmoMYsH42ETpB5k= xQkh+21nCbYc=3Dw1nEg@mail.gmail.com/T/#mbc87e67faf71cc58c6424335333935bf774= 0d49e