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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B32FC71153 for ; Sun, 10 Sep 2023 22:01:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z1IJoC1tzi+K95YlNShk3VuAav2+iKLhN9IGnmMvtxM=; b=vDwlVylBjo0iai yvUFocYTnL1zYDXylYRoldCRuOtteWVAG2jM5ch4swXsIZuXzrxwU9jbqaSZRuy1P3rLCbImVyCnp sIbtoOA5rHLN2IJ2FDRwbhDq+9MBHYw4VSXlw1poVL+MY16ha/Mh3uqgbfuH6o2XozPAA88Z7jF8U nIrVvb93AytxJ4C0COroeLZWly4+YRQAM6Nm7Wvtb+FZbaXuMio4XRZfiB9NTLtUXEXMxWqu31QgL 2WMdPXLL0zwT+z6PPLlJiB0CXfBWQ9DsNQmWIOd5cYLYGNc4Et3duiVChG7ah8++y+xaH7HOK40/X rQ0TBd4zA7noajIYPDwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfSUn-00GvqD-0D; Sun, 10 Sep 2023 22:01:33 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfSUj-00Gvpe-1G for linux-mtd@lists.infradead.org; Sun, 10 Sep 2023 22:01:30 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-68a440a8a20so3655666b3a.3 for ; Sun, 10 Sep 2023 15:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1694383288; x=1694988088; darn=lists.infradead.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=EyybjuBSw2AsBAibBPVqGccWs6P0JtTeGBB0Kwx90Dw=; b=bFLSyKHRJkDwkXQIDjXzBAuKQ1MwI1Lgd+FwgmuLr9SEGsPQPMG6eHUqqx4e3PTC45 IPJo7JPapPmypq+2CqKHNb2Gno/r4QAQ/bSR+qNowoAUFqLX60O9gTzVYHBPxxkWnzKW zy283ex5aHK+iBgPKxN0sdkLWMxubrJS+bU3bdkBMLGNB+NLmM7T6tAFLG6PQfp80e40 r4J3asCiU8jPbnHMLzGaGvBYHF9/RZ2l8RALjL0Cco+YGwNT88HQ28vzZTso4LPFaCfI d5EHojkNI4ktnbldGI38qSkcknnIrqsks0u6ctVuFvh00+uaUDjtBf64SSN1//xtlynk 6nEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694383288; x=1694988088; 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=EyybjuBSw2AsBAibBPVqGccWs6P0JtTeGBB0Kwx90Dw=; b=ryw7NkKpxR8SsoX4RtI+GIjjSnXmTWgumoRFTfJiAokFvTf13VyhcuxboQVxmXKWR9 BzBv+qk67W7vz/Paf10zL4G92QHUXIUxmkfmMQYDTM6lqP4BUT72CTDHVbmLXNGlg+tv 9nbQGCMlWbYcBvduhhdx4y3uRrzlMRJP5BjyqhzMa9dyDNYYISgxbfwJq/pcX+/wDeek fgvUF6QeBXAIK04N47zpsASWdB0jyASZM0ZWWPLI5yovXKH03QX1HhQfO/6aRf5Sg7VS s5R6ZDlL7bd9uDaLaYXkZKqSLOtjZbUTg0+7I4g4q37VKCRp70NqJ7e1/4Bt2yhKDaKV DMjA== X-Gm-Message-State: AOJu0YwgKQZA6WVeEMqncPMcH/zNQoAhe+fML0rqjb8VPH8+v3elbYbt i+GCG9bLkA0DbvkBH8NJIBNYig== X-Google-Smtp-Source: AGHT+IHSYFPf3w2qdTZr9bikkzuSsvPYQjYYZyW+Zfc616rQWXs3Eeo2BzwinmhhOfJVOtnHj1lBTA== X-Received: by 2002:a05:6a00:1a0c:b0:68c:57c7:1eb0 with SMTP id g12-20020a056a001a0c00b0068c57c71eb0mr9371853pfv.11.1694383287795; Sun, 10 Sep 2023 15:01:27 -0700 (PDT) Received: from dread.disaster.area (pa49-195-66-88.pa.nsw.optusnet.com.au. [49.195.66.88]) by smtp.gmail.com with ESMTPSA id u10-20020a62ed0a000000b0068a3dd6c1dasm4403641pfh.142.2023.09.10.15.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 15:01:27 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1qfSUe-00DWBA-0u; Mon, 11 Sep 2023 08:01:24 +1000 Date: Mon, 11 Sep 2023 08:01:24 +1000 From: Dave Chinner To: Pavel Begunkov Cc: Hao Xu , Matthew Wilcox , io-uring@vger.kernel.org, Jens Axboe , Dominique Martinet , Christian Brauner , Alexander Viro , Stefan Roesch , Clay Harris , "Darrick J . Wong" , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-cachefs@redhat.com, ecryptfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-unionfs@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, linux-nilfs@vger.kernel.org, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, Wanpeng Li Subject: Re: [PATCH 07/11] vfs: add nowait parameter for file_accessed() Message-ID: References: <20230827132835.1373581-1-hao.xu@linux.dev> <20230827132835.1373581-8-hao.xu@linux.dev> <642de4e6-801d-fcad-a7ce-bfc6dec3b6e5@linux.dev> <6489b8cb-7d54-1e29-f192-a3449ed87fa1@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6489b8cb-7d54-1e29-f192-a3449ed87fa1@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230910_150129_456769_67954912 X-CRM114-Status: GOOD ( 34.20 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Fri, Sep 08, 2023 at 01:29:55AM +0100, Pavel Begunkov wrote: > On 9/3/23 23:30, Dave Chinner wrote: > > On Wed, Aug 30, 2023 at 02:11:31PM +0800, Hao Xu wrote: > > > On 8/29/23 19:53, Matthew Wilcox wrote: > > > > On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: > > > > > On 8/28/23 05:32, Matthew Wilcox wrote: > > > > > > On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: > > > > > > > From: Hao Xu > > > > > > > > > > > > > > Add a boolean parameter for file_accessed() to support nowait semantics. > > > > > > > Currently it is true only with io_uring as its initial caller. > > > > > > > > > > > > So why do we need to do this as part of this series? Apparently it > > > > > > hasn't caused any problems for filemap_read(). > > > > > > > > > > > > > > > > We need this parameter to indicate if nowait semantics should be enforced in > > > > > touch_atime(), There are locks and maybe IOs in it. > > > > > > > > That's not my point. We currently call file_accessed() and > > > > touch_atime() for nowait reads and nowait writes. You haven't done > > > > anything to fix those. > > > > > > > > I suspect you can trim this patchset down significantly by avoiding > > > > fixing the file_accessed() problem. And then come back with a later > > > > patchset that fixes it for all nowait i/o. Or do a separate prep series > > > > > > I'm ok to do that. > > > > > > > first that fixes it for the existing nowait users, and then a second > > > > series to do all the directory stuff. > > > > > > > > I'd do the first thing. Just ignore the problem. Directory atime > > > > updates cause I/O so rarely that you can afford to ignore it. Almost > > > > everyone uses relatime or nodiratime. > > > > > > Hi Matthew, > > > The previous discussion shows this does cause issues in real > > > producations: https://lore.kernel.org/io-uring/2785f009-2ebb-028d-8250-d5f3a30510f0@gmail.com/#:~:text=fwiw%2C%20we%27ve%20just%20recently%20had%20similar%20problems%20with%20io_uring%20read/write > > > > > > > Then separate it out into it's own patch set so we can have a > > discussion on the merits of requiring using noatime, relatime or > > lazytime for really latency sensitive IO applications. Changing code > > is not always the right solution... > > Separation sounds reasonable, but it can hardly be said that only > latency sensitive apps would care about >1s nowait/async submission > delays. Presumably, btrfs can improve on that, but it still looks > like it's perfectly legit for filesystems do heavy stuff in > timestamping like waiting for IO. Right? Yes, it is, no-one is denying that. And some filesystems are worse than others, but none of that means it has to be fixed so getdents can be converted to NOWAIT semantics. ie. this patchset is about the getdents NOWAIT machinery, and fiddling around with timestamps has much, much wider scope than just NOWAIT getdents machinery. We'll have this discussion about NOWAIT timestamp updates when a RFC is proposed to address the wider problem of how timestamp updates should behave in NOWAIT context. -Dave. -- Dave Chinner david@fromorbit.com ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/