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 99285CDD1D5 for ; Mon, 30 Sep 2024 20:19:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B1506B01F4; Mon, 30 Sep 2024 16:19:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13A346B01F8; Mon, 30 Sep 2024 16:19:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1D256B01FA; Mon, 30 Sep 2024 16:19:53 -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 D36FA6B01F4 for ; Mon, 30 Sep 2024 16:19:53 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 65F75160514 for ; Mon, 30 Sep 2024 20:19:53 +0000 (UTC) X-FDA: 82622520666.07.1E8493C Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf07.hostedemail.com (Postfix) with ESMTP id A171E40003 for ; Mon, 30 Sep 2024 20:19:51 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=HNeoExnW; dkim=pass header.d=linutronix.de header.s=2020e header.b=pWaiUOZf; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf07.hostedemail.com: domain of tglx@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=tglx@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727727553; a=rsa-sha256; cv=none; b=Nt187K8E5EIVEEAoR+73DbyQTmH34OpOZP3Wgu9xIWnRMddcc0C2e831pphWWhoc8nxsUH NGk9SvWbwz3GRNwa7oqFG8sDrR6++wjvnC0lAADDFhYRNhiKG+c76cSt+bHSO9f6KQ5AQa wFhyEPim5vhGdA6cUuJS4mns5lv5EM0= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=HNeoExnW; dkim=pass header.d=linutronix.de header.s=2020e header.b=pWaiUOZf; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf07.hostedemail.com: domain of tglx@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=tglx@linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727727553; 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=j/LtJqKHUTSwVdWDJ6SYgdQJeD/iftK+N2Uf0ekJLtA=; b=yi9CZcOYiJ02MrB4yRjeTV5V2Mdr1TRon5DnQDAaq6NGcRuak9LaZAweIhPZw9IHTAPbvK R2m/diilhU0l+i4HX5YsS65dPfNETdZsEV/JBrfAQ05/FaF8z3EyG/b8RGhunMo270Gy6j pQ6HzsM9P3NnxwnBIDgzR609Td24Cj4= From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1727727590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j/LtJqKHUTSwVdWDJ6SYgdQJeD/iftK+N2Uf0ekJLtA=; b=HNeoExnW+oeHm7SmHkX8d15Zjdr1SoahHX+PJDVmShf5T/z5YcA0TiqBCQOjEF8tYPT0xV +h7/GwnkvGqj2U5N1jrgxe5nx+DrKTX4y9vGpHxjjCCrUhjsAmFS830XqfPnBg0orb2Wxe YjCyFSogq8d8lUU4ubbFZMv6OtODKOoxby8BzlO4uWuEB0WA/my5ow2Rs7eJh4s+BxVCVO jhz30M2OrYOzQtX2JV7VWwbBw+rTwzDiwh+dJutMHEdO/Uh6ttnbqu2mJbkXnKLwIV1zYA R9OUP+6ZugtygSRByLsPPx0hn+n2YeRxw1ayDN2TdiFuJwxqM8InVRi0fTxe7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1727727590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j/LtJqKHUTSwVdWDJ6SYgdQJeD/iftK+N2Uf0ekJLtA=; b=pWaiUOZf5GRjFO3neiTHp/w5ivxA1upXAxA68R6hb+7uEsv+m1y6j3FSGtGacutTgd6BfI 5NPRzTiItvTDMMBw== To: Jeff Layton , John Stultz , Stephen Boyd , Alexander Viro , Christian Brauner , Jan Kara , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Jonathan Corbet , Chandan Babu R , "Darrick J. Wong" , Theodore Ts'o , Andreas Dilger , Chris Mason , Josef Bacik , David Sterba , Hugh Dickins , Andrew Morton , Chuck Lever , Vadim Fedorenko Cc: Randy Dunlap , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 01/11] timekeeping: move multigrain timestamp floor handling into timekeeper In-Reply-To: <4933075b1023f466edb516e86608e0938de28c1d.camel@kernel.org> References: <20240914-mgtime-v8-0-5bd872330bed@kernel.org> <20240914-mgtime-v8-1-5bd872330bed@kernel.org> <87a5g79aag.ffs@tglx> <874j6f99dg.ffs@tglx> <878qv90x6w.ffs@tglx> <4933075b1023f466edb516e86608e0938de28c1d.camel@kernel.org> Date: Mon, 30 Sep 2024 22:19:49 +0200 Message-ID: <87y138zyfu.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Rspam-User: X-Rspamd-Queue-Id: A171E40003 X-Rspamd-Server: rspam01 X-Stat-Signature: qhe98sz6o6xfx7osk158mje4pmtpj9ht X-HE-Tag: 1727727591-741736 X-HE-Meta: U2FsdGVkX19KmYIQh1pF5SG82r5OS68E0g2H0HZvnGZj7DbO3Xh1GHaYABUocJ234cyURtxKfsny1KISZZePPN23AtSvv4hzzmKEgHXRt3biYTxdVziaOs64w5RV2hhYJYcwyV+ga1WrlfGDgWi2dGPoMR9er6eMOWxs6R4yadVxzloVnf/5u9TW/LmSFJplXWvHKV0xPfMehpzTK/pmFkZERUcm8V1FDW+TxnnZzzU48lzcMrHIu7sFJB6FPjx0NNwGIq6iOpw1vJ+9BeMSogKtbbfbUQjkhVx05XmYv3HO/sH10BYrNSNzWCYvoiWqYzzZu9GNqeB6mZsoodajFXUu/Z82t8wOkmbYpRd/Fkp4suCvtTaP+sBAbHzcvMAMGHNFXAzIaguoEBHQH7MOGlmkAzmW+6S+XTgi3XbuEgbQ5jkDXQCE66dfX1poSyCoR2MsUV+s+Jx1BCSJeihz6DXjcIQFEkHiHyMW3vsXm7TBv8N+Rs/cazYZqZYI6ruB3vwqedBCRG1k13u4mLqq53s3oIgQu7VO6aTSW3JpMvQboZacRgfqwHZTDOvHonrS4EhPmqOmvq/a5lI/wB1bN+PcqkP8LvQL3jmOhkP6x3SyoRLZ0BDoyCRrZZwfVr4y6KhD8f6MPq3nhENPXmeFJ4oEgWQpi4m5ISOKfakBNX70llAetSJZzKRFTLXD+xoJzpnNUUdrO3pt3YEqL106P/Hy0WMBADFC0Ubo/ibq7Sf02zMzByyWqkqCtB7tWaf97KH2141DU2DCY+LfX6UVHVnlWJl4jsrRH9mtM33jACf0i/9G0hEioNkEQcXgO2LyoqanOyEb3IdOh+eYwDncxmMSG1fpGmzhEkfiWucHDGIJQH0pqj06V5NGvSAvYH5C4qSEqwAIP7LtFApLuP3BBRa59Ya6+juGIOb+xNHiX04FoaxaQPqgW9L/nC+pOBskrQL5PX5FT5eoOPi4K9Q 2ydI2+U6 gZYXAcTayUdUzacYraa2CXA9O2ivh1lABiKYwK37tnt+i9mo0BOXamwO6gL3jmEESOTkDnysBp0zWr1hcFVgB8IfdvMpifkZ5i26v4HLR8Aff3YUjOBja1CJgoASNnNEdOvRatsRK5WFeAwG/iZI4csSuAVYjlkHuIwu0 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 Mon, Sep 30 2024 at 15:37, Jeff Layton wrote: > On Mon, 2024-09-30 at 21:16 +0200, Thomas Gleixner wrote: > I have the following section in the multigrain-ts.rst file that gets > added in patch 7 of this series. I'll also plan to add some extra > wording about how backward realtime clock jumps can affect ordering: Please also add comments into the code / interface. > Inode Timestamp Ordering > ======================== > > In addition to providing info about changes to individual files, file > timestamps also serve an important purpose in applications like "make". These > programs measure timestamps in order to determine whether source files might be > newer than cached objects. > > Userland applications like make can only determine ordering based on > operational boundaries. For a syscall those are the syscall entry and exit > points. For io_uring or nfsd operations, that's the request submission and > response. In the case of concurrent operations, userland can make no > determination about the order in which things will occur. > > For instance, if a single thread modifies one file, and then another file in > sequence, the second file must show an equal or later mtime than the first. The > same is true if two threads are issuing similar operations that do not overlap > in time. > > If however, two threads have racing syscalls that overlap in time, then there > is no such guarantee, and the second file may appear to have been modified > before, after or at the same time as the first, regardless of which one was > submitted first. That makes me ask a question. Are the timestamps always taken in thread (syscall) context or can they be taken in other contexts (worker, [soft]interrupt, etc.) too? Thanks, tglx