From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1678CC3DA41 for ; Thu, 11 Jul 2024 14:44:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CC026B009B; Thu, 11 Jul 2024 10:44:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 57B916B009C; Thu, 11 Jul 2024 10:44:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 443756B009E; Thu, 11 Jul 2024 10:44:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 26B496B009B for ; Thu, 11 Jul 2024 10:44:40 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C0E001C1239 for ; Thu, 11 Jul 2024 14:44:39 +0000 (UTC) X-FDA: 82327743078.23.87E904D Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by imf27.hostedemail.com (Postfix) with ESMTP id 69D6D40012 for ; Thu, 11 Jul 2024 14:44:36 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=F3nHgDOr; spf=none (imf27.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.128.179) smtp.mailfrom=josef@toxicpanda.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720709044; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=p6PLNSJZMY2HBtPFlfBgNDPZWDEOAS/uY6eb53FVzXU=; b=20ajIVcFXCo1oGWD32yPELJxPhYS0OCMiX+K9vwI8R2pr0AKd5u1tt6sOA0qrPHsuIK/at EylOfB71KVS4TLMZ015I+R8z5Bv5cJIC1irU2l/B5tdk6JVXTE207/im3ItH8QLUTklY07 rKW74/iLsOl7v5uQYHIeumgnGdNjiyo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720709044; a=rsa-sha256; cv=none; b=UCNG++OhwDeW+Oarjm0gImC5z5Q4+SRmMT/kLpX7EBv+PqI35K3/EHY7oO7m6g07oCy3qz J3OpqdgEOUoEeKoJuSr60GTmaqcniChVIV6//7fhTwLn8aJDlBCImxJ88uHnBUALVvXTGj 2WERl7ovbVT0NO2jxhQmrlIrOgOn0MA= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=F3nHgDOr; spf=none (imf27.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.128.179) smtp.mailfrom=josef@toxicpanda.com; dmarc=none Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-64b29539d87so8897907b3.0 for ; Thu, 11 Jul 2024 07:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1720709075; x=1721313875; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=p6PLNSJZMY2HBtPFlfBgNDPZWDEOAS/uY6eb53FVzXU=; b=F3nHgDOrBCGM3Y+LG0nnO4xi5h7GyE9HUZX+fsKoi+DzYHlbsqAQUQJzGnMdTFhNsG dki0SQibfIztpqKeDT5LxRAGD8pwl2MnnAlboQgkmtFam8Cn01AHkHjMIKmxmWSs67kx /l3KJ1ZwqN9oO4Mb/MCaD2R9Gw05zojX0byx8uY38AN95nCepI9ZS+V/v03hEawgKDti a+Jm0GPPMMApKzL3cm2djP9IE1AOkYdk2ESJoT4l+2QDKQ87v55PFO0njnQ00giLeyU5 W748ecKp/klK6/tZYhNC/xQZEnrcIgezQ5m4nUmGbR8dcC+tXKF+rjgyo4q/kSwIXh2I vmpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720709075; x=1721313875; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p6PLNSJZMY2HBtPFlfBgNDPZWDEOAS/uY6eb53FVzXU=; b=gGWuV35Mr1IpLDWmN5nAtANbMhahR1y6hKHKp9W+sXq4XSsDzIIK1myP3eet4NSS+E qvH0qXcjZ0nMOrg3dhNhkPTjA8pLEZnupkXhqYnmVXwj/MJc8uulLY560bqnM5yAFQPs B98HYA4Y/Z3baaOE+j3WsoQVKucMVQB3BTcr7OBefef9DYvgzv45puGqfydn6t/wVRmd jpADFlYMGh3ZivW/zjI8NwxmDEeKWh94Pum+kcNRoTIKLHpAjgoAnSb7y1GjR4UB6uUW MsS8Q5HFYtxOscifo9fbJKESEuxOC/irPHgIOk8CSX8+0YyysKj7PFxLaImKmEDOGhQ/ ywow== X-Forwarded-Encrypted: i=1; AJvYcCUd+TBNW8SiQDT1/w5KAmSQbjAnBGam1ZQPkSD1TOq6JvVJs+Y9uSpG86yXzK3j2p7IDS9DlcdKxvrBnjI3vkT+cNE= X-Gm-Message-State: AOJu0YzSXJWk0/1HO5QT8ea7z8wieNpYva+MWiLWgstd7c1ZSSYNMraE ueeh8STcG6nIdKVFaGhYUjQ+tbsl9da60kfOhaa9sPbX88Odpk+fqo2g8sw6XVA= X-Google-Smtp-Source: AGHT+IFAnEDVnsGx1tZ1AxBo1QTn+tOSC2MfALvNb6Q+MllvTQBzHLMq8T3kjDK5yp3+1lqcT3GiRg== X-Received: by 2002:a05:690c:3385:b0:62f:2553:d3b3 with SMTP id 00721157ae682-658ef3414eemr120805467b3.29.1720709075414; Thu, 11 Jul 2024 07:44:35 -0700 (PDT) Received: from localhost (syn-076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id 00721157ae682-658e4936079sm11198567b3.15.2024.07.11.07.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 07:44:34 -0700 (PDT) Date: Thu, 11 Jul 2024 10:44:34 -0400 From: Josef Bacik To: Jeff Layton Cc: Alexander Viro , Christian Brauner , Jan Kara , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Chandan Babu R , "Darrick J. Wong" , Theodore Ts'o , Andreas Dilger , Chris Mason , David Sterba , Hugh Dickins , Andrew Morton , Jonathan Corbet , Dave Chinner , Andi Kleen , Christoph Hellwig , Uros Bizjak , Kent Overstreet , Arnd Bergmann , Randy Dunlap , kernel-team@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 0/9] fs: multigrain timestamp redux Message-ID: <20240711144434.GB1235314@perftesting> References: <20240711-mgtime-v5-0-37bb5b465feb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240711-mgtime-v5-0-37bb5b465feb@kernel.org> X-Rspamd-Queue-Id: 69D6D40012 X-Stat-Signature: 74g4of4mnn5sep3zn4yobt8fcbifabc1 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1720709076-360134 X-HE-Meta: U2FsdGVkX1+ALNO9RuhQJjJZZF/eytuIugQ5RcEg8aappCaoLENyKxBJTSQmXmpkBv53JYicZ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j9a3JVpiUq/qZvy37ya5WNgETJITRjatKW4gl381Pg1frPWEyCi4vZPOFfAZEd/yqR2uM/Mcod4kDjRuI9sBmu8k+dvhTertwAAddwXxfXySYy00gsjFdd+QhubiS+36Hu8tGmkPCnC2gWH/PAoeJSFtoMA8j80O6fiIhWY+DXZ0NgXVd8X4l+16322xwdm6KrmEsAHmy/qzNvmDtkcBlAC3M0ew96IjeXSqI8GsMmlRxLKtHOUwNCvTnECTQpX8d4Iqcs+MFhp0Va5A9EzsvVUw/wKWfIErzK/ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Jul 11, 2024 at 07:08:04AM -0400, Jeff Layton wrote: > tl;dr for those who have been following along: > > There are several changes in this version. The conversion of ctime to > be a ktime_t value has been dropped, and we now use an unused bit in > the nsec field as the QUERIED flag (like the earlier patchset did). > > The floor value is now tracked as a monotonic clock value, and is > converted to a realtime value on an as-needed basis. This eliminates the > problem of trying to detect when the realtime clock jumps backward. > > Longer patch description for those just joining in: > > At LSF/MM this year, we had a discussion about the inode change > attribute. At the time I mentioned that I thought I could salvage the > multigrain timestamp work that had to be reverted last year [1]. > > That version had to be reverted because it was possible for a file to > get a coarse grained timestamp that appeared to be earlier than another > file that had recently gotten a fine-grained stamp. > > This version corrects the problem by establishing a per-time_namespace > ctime_floor value that should prevent this from occurring. In the above > situation, the two files might end up with the same timestamp value, but > they won't appear to have been modified in the wrong order. > > That problem was discovered by the test-stat-time gnulib test. Note that > that test still fails on multigrain timestamps, but that's because its > method of determining the minimum delay that will show a timestamp > change will no longer work with multigrain timestamps. I have a patch to > change the testcase to use a different method that is in the process of > being merged. > > The testing I've done seems to show performance parity with multigrain > timestamps enabled vs. disabled, but it's hard to rule this out > regressing some workload. > > This set is based on top of Christian's vfs.misc branch (which has the > earlier change to track inode timestamps as discrete integers). If there > are no major objections, I'd like to have this considered for v6.12, > after a nice long full-cycle soak in linux-next. > > PS: I took a stab at a conversion for bcachefs too, but it's not > trivial. bcachefs handles timestamps backward from the way most > block-based filesystems do. Instead of updating them in struct inode and > eventually copying them to a disk-based representation, it does the > reverse and updates the timestamps in its in-core image of the on-disk > inode, and then copies that into struct inode. Either that will need to > be changed, or we'll need to come up with a different way to do this for > bcachefs. > > [1]: https://lore.kernel.org/linux-fsdevel/20230807-mgctime-v7-0-d1dec143a704@kernel.org/ > > Signed-off-by: Jeff Layton Reviewed-by: Josef Bacik Thanks, Josef