Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4377099rdh; Tue, 28 Nov 2023 22:33:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSBZN4xDJWuFx67sZJQk2+9Nt0xJUcsTEVHogux0y5GMcDZT2P2uu40vkseLapHBpZbfIw X-Received: by 2002:a05:6a20:1455:b0:18c:3ea9:b84d with SMTP id a21-20020a056a20145500b0018c3ea9b84dmr19876666pzi.9.1701239588598; Tue, 28 Nov 2023 22:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701239588; cv=none; d=google.com; s=arc-20160816; b=B2LOXv8SqJ2FvrDv+1XsMGaGbbjuRpmErNpwp734B2GUSr84XIbHaB4D5CMADwBV2o C6SckupWU7gvtKMEvn8p2Bmk0b0S5wgspxag4bVTOfAflUYvOMUw2FOJqsE7eawnIJpw bahdzjP9p9wRVZaryHjSQ+4W9qkkKhGh0EGWze29Eo0CqDp+fGxlCsIyPtyfjJDNR3ZZ LUNqOfs0DhOdeegzH9YO2/qkzw5rV66oM9CK+qIhqkQbyAd+17D2GHqF7Y6O1j/hLtRq gzPrVn14PUZQMHLFjuOVVmpojCpNQ46LIfiS5SDzR/CwsqVbvj+6DD3huU4zO544DHwE ZGzA== 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=TWq/t0u67v2rmHoA0biAg96aAnVgN6dEVTLzGtd0tU4=; fh=f3/qaWu5cd70pO6y9Vd3Ty/P6k7pkfO5aiw5e5sZCy8=; b=tM0K2/NgRt2eYHAUVRltcyF9FEvVAL6zlB0qcVjax+8qr5QMk/FLEDZ2DbnuwjL9wc 3WnLMzxn7uzTjGcha4CQjvhokZPWTKdeEK1fiLnLZ3Vop+Q6k0gaO1pn99n8zocWdmZ3 917W3/8YS1P/Rf8DU7mojO5eHxODKOYe07Fd8sAeTRJsetusDPCzO+/MCGjckcDFyCVq zkQHsTknBoO0e3eM+gjvUe71qCchVtfBFtvp5GNAZuL+V8iFfeUVp1pKNHUg/cAu+dMY ilJUUdHWykwvW052ykeJZG5Pm00Al59Evgj5EdDh2NpHZMwGutSzfbDmS+kKl7pNCzIT G+pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CxWXG8PP; spf=pass (google.com: domain of linux-ext4+bounces-217-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-217-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ei37-20020a056a0080e500b006cc0519f597si8651630pfb.83.2023.11.28.22.33.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 22:33:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-217-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CxWXG8PP; spf=pass (google.com: domain of linux-ext4+bounces-217-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-217-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 636D92823B8 for ; Wed, 29 Nov 2023 06:33:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D3CB107B5; Wed, 29 Nov 2023 06:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="CxWXG8PP" X-Original-To: linux-ext4@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1CC719B7; Tue, 28 Nov 2023 22:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TWq/t0u67v2rmHoA0biAg96aAnVgN6dEVTLzGtd0tU4=; b=CxWXG8PPt4BemfhTFre5zsLu0F bsXzraNfKCISHJW9w2B1vELyX1JjscoqQVo2AbqQ6pDlDlnfWpIPBU9tLYsAGGa2YMNT0/MAczYXb /1Uibq1gSwa0jX9P9h5znTyj9eI628wOkY61VYdE22YnKQBGxeLUoIgV1FT2amd5NH3SSgwMoquHM 2B+ZJjKyvC9RCyvkuhNnfca/k5VSqjuPaAB39aQUwjJbUm55mpY4dEkjYLv+hpy4o9+kX9+NwL+uk PAW1iGQ2RpX40izmC5Je+A9K+asRhrX3bXb1G/1dIftZKkXGsoZlODjuCj1258k0e6/dUrVAX+zDT Jfz+aPIA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r8E82-007F1O-15; Wed, 29 Nov 2023 06:32:58 +0000 Date: Tue, 28 Nov 2023 22:32:58 -0800 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Dave Chinner , 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: References: <20231122122946.wg3jqvem6fkg3tgw@quack3> <20231123040944.GB36168@frogsfrogsfrogs> <20231129053721.GC36168@frogsfrogsfrogs> 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: <20231129053721.GC36168@frogsfrogsfrogs> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Nov 28, 2023 at 09:37:21PM -0800, Darrick J. Wong wrote: > TBH I've been wondering what would happen if we bumped i_mappingseq on > updates of either data or cow fork instead of the shift+or'd thing that > we use now for writeback and/or pagecache write. > > I suppose the nice thing about the current encodings is that we elide > revalidations when the cow fork changes but mapping isn't shared. changed? But yes. > > > > Anyway, I'll have time to go play with that (and further purging of > > > function pointers) > > > > Do we have anything where the function pointer overhead is actually > > hurting us right now? > > Not that I know of, but moving to a direct call model means that the fs > would know based on the iomap_XXX_iter function signature whether or not > iomap needs a srcmap; and then it can modify its iomap_begin function > accordingly. > > Right now all those rules aren't especially obvious or well documented. > Maybe I can convince myself that improved documentation will suffice to > eliminate Ted's confusion. :) Well, with an iter model I think we can actually kill the srcmap entirely, as we could be doing two separate overlapping iterations at the same time. Which would probably be nice for large unaligned writes as the write size won't be limited by the existing mapping only used to read in the unaligned blocks at the beginning end end. > > One thing I'd like to move to is to merge the iomap_begin and iomap_end > > callbacks into one similar to willy's series from 2020. The big > > Got a link to that? I need my memory refreshed, having DROP TABLE MEM2020; > pretty please. https://lore.kernel.org/all/20200811205314.GF6107@magnolia/T/