Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp95450rdh; Wed, 22 Nov 2023 20:10:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjlWMtJisUTccvbEMyMOdNZk1zCXQfu6sLE/Fz7WB1W0eEzWxhkyDFZAnyyqYUx0sYDZDk X-Received: by 2002:a17:903:2308:b0:1ce:5b21:5c40 with SMTP id d8-20020a170903230800b001ce5b215c40mr4535639plh.28.1700712600621; Wed, 22 Nov 2023 20:10:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700712600; cv=none; d=google.com; s=arc-20160816; b=zNs247wBKXN4nezJ1irvphNeq76GRWPS6MYA+GZ2ojrctkPGKm5ErnahhFqRpvuh2w /Q2n1t3JkHN0FFp6UUcSAf8oIbTcj9IHjymwMhK4dYRH6J7jQ+j7ixH8/GafHqodzndg Hkr7MV+ooRx9RVCVU5UJCDGRtWoPJLyP7s71M2wz13DFlpC+21SEKHHqEBSC3x7sz+Vc WfblSn3izP4owKayybVxdLkN35dr/W2jRmruOqbqOdaACyDQ7mIbuP5d0CYfKaHT4e1D sjMSErsYuURSkM9lnwXe0UuCifKsyU/sujGXAsAhV/bc9QmC8SIL+m97uhW1kfsgTVhR QkPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=id/TrcI4Z/BZRHo9ZVeaNkUv31+qXvHO3gUEUxlFsQQ=; fh=2LA5e2h/TKB07aVl1W+mAx9+8bEDeFyOUWWbuFDrd8A=; b=UHSsHI8A3jT57yH0bLFfIFTyF1P+UF5lXnW/TqXJLTQsgQUbmc6cTBrv3WjEYt57gf xhp9nykZU7/LEaK8QrLoQ2tD/igW70QWTEusWlSzAYoem0yVqD5/nsKMtHhpqk1ts0Xy 92spmvE0T7s3xyINiMMB2x6b4OY506uLWABRBYZLKEW2bkh79wYt67eKXN56aDqkuMpt 5n3AoGePPuWQt1HTxrL010k63s5IiRt6kMgGfyQ6DRQRwBZ/G7wh8an5UvCMWVRprEyb 0PT1WKF1NGUq4A2rRfwPpERQebp3H046BHflHBcp8R0Klky1Q3DrHPl59bKWyIGcvcb1 J6sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UW2DeccM; spf=pass (google.com: domain of linux-ext4+bounces-98-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-98-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a15-20020a170902eccf00b001bf0916b665si345714plh.393.2023.11.22.20.10.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 20:10:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-98-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UW2DeccM; spf=pass (google.com: domain of linux-ext4+bounces-98-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-98-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 11B39B211B3 for ; Thu, 23 Nov 2023 04:09:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BDACBA22; Thu, 23 Nov 2023 04:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UW2DeccM" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA17DB658; Thu, 23 Nov 2023 04:09:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53C3DC433C7; Thu, 23 Nov 2023 04:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700712585; bh=Bw7Y1tSIteesdKurZaVVowFevEIWL8qOrFUxj6OO8og=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UW2DeccMXA1iij26Yvi2JJnQj5PBKI4wUmc+Wo2TqjqLkSTAJoR9Xnh56yOjNDZN1 kXuurynouJxCJRhg94PSRMJdC5nXhEG6iJ3608NPf+AoB5ylVojn4K94dbMpMj/o0V ghyjBNb6DTKFnEAzZ+bBw9tU+guIl60Kn8DtuBRX3Jdrgf43S2tJt+OzfcJBb0T7Ol MTGngPb+MluhGMf7JsdUtaLqvrK75cpC/lKjxqjhTUOkqE5LjbRC3MDVcih+envSuW IlmR34h9evh8tH3YDmPy+MAld+VjlmlN23EXw8yhbtdHpJOhiBepNm6hRnbyEApgRE wfF6tK92eg/pg== Date: Wed, 22 Nov 2023 20:09:44 -0800 From: "Darrick J. Wong" To: Dave Chinner Cc: Christoph Hellwig , Jan Kara , "Ritesh Harjani (IBM)" , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC 2/3] ext2: Convert ext2 regular file buffered I/O to use iomap Message-ID: <20231123040944.GB36168@frogsfrogsfrogs> References: <20231122122946.wg3jqvem6fkg3tgw@quack3> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Nov 23, 2023 at 09:26:44AM +1100, Dave Chinner wrote: > On Wed, Nov 22, 2023 at 05:11:18AM -0800, Christoph Hellwig wrote: > > On Wed, Nov 22, 2023 at 01:29:46PM +0100, Jan Kara wrote: > > > writeback bit set. XFS plays the revalidation sequence counter games > > > because of this so we'd have to do something similar for ext2. Not that I'd > > > care as much about ext2 writeback performance but it should not be that > > > hard and we'll definitely need some similar solution for ext4 anyway. Can > > > you give that a try (as a followup "performance improvement" patch). > > > > Darrick has mentioned that he is looking into lifting more of the > > validation sequence counter validation into iomap. > > I think that was me, as part of aligning the writeback path with > the ->iomap_valid() checks in the write path after we lock the folio > we instantiated for the write. > > It's basically the same thing - once we have a locked folio, we have > to check that the cached iomap is still valid before we use it for > anything. > > I need to find the time to get back to that, though. Heh, we probably both have been chatting with willy on and off about iomap. The particular idea I had is to add a u64 counter to address_space that we can bump in the same places where we bump xfs_inode_fork::if_seq right now.. ->iomap_begin would sample this address_space::i_mappingseq counter (with locks held), and now buffered writes and writeback can check iomap::mappingseq == address_space::i_mappingseq to decide if it's time to revalidate. Anyway, I'll have time to go play with that (and further purging of function pointers) next week or whenever is "after I put out v28 of online repair". ATM I have a rewrite of log intent recovery cooking too, but that's going to need at least a week or two of recoveryloop testing before I put that on the list. --D > -Dave. > -- > Dave Chinner > david@fromorbit.com >