Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2096999rwd; Fri, 26 May 2023 01:26:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7R33y16K+889fU/VPpqWioEXcrxhhfJa71PQpHETsrTHDwNwo40zttACg0pBS4g/l3m5CW X-Received: by 2002:a17:90a:c909:b0:255:c479:551e with SMTP id v9-20020a17090ac90900b00255c479551emr1717275pjt.13.1685089608620; Fri, 26 May 2023 01:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685089608; cv=none; d=google.com; s=arc-20160816; b=b00Rbj4m444s+VuxVZpNtUGGbkLxgv7hzrde++bzrosvrgziRUlCYHlEMyWuAumQ6m XkW8aZOgpG4jy00UzjGskpPf8zskD7d7Too9O1fCaAXIfnQl0ZGtgip0LQ2rUt5ofzXE jDvrScJnFD1rd8nQRyTIyQSJSyMBk/U22tbOReOqZ01o1m0YYiRP7o9AXSv1M1MS11A+ i2DsOv0zoAkBEs+wsJLMgJSNcCgR/YZRPdKf3pnakyRdrYiF3wVYjZ5cxhNmcY9lVyKf ruuCNtlLL2Zzmu+KEHtxEt/3bqZ1FQiyY9fvb6nXsVoEbuX65EwhBnu/c4fKmgADg5IO hDZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=suhlTCSdjkwwCawJJF8xodaRhqnhkhv/03FtDn0nrOI=; b=NdYly949xLTWsAwo3Nq/FttC2/UfKV96Fz+Oyz+KaaGuBFRYjVkfTSN6KnNbDeB/ZS X6Koj/w3+F5EphyNYn7l+rNCd2KeVKJ1LFU3Ng3dcbfKKHjc3/AlehHxZqSd+wKRkeXF 0pz62GXvLt/bXaNsY61bkw236QMhLu1NLQDoSVREEa+8hlg65/TI03BUeWp5ZfH6ScRH hd8U64jqxwuZCdsPV2mh8Mg9eMxkspxv/pW26swxoyDulen6p5z8+ozm6RqI2B1gBvOA CyDf4GJ96/dJwQdvhd7B2Zig90TpLjeCxPl7oMA6fPqNuyBCCu+e85qi6FWYsJuwL5hE SjRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=tCeXdpnj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a633850000000b0053477896e81si3196193pgn.187.2023.05.26.01.26.30; Fri, 26 May 2023 01:26:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=tCeXdpnj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242335AbjEZIKt (ORCPT + 99 others); Fri, 26 May 2023 04:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjEZIKs (ORCPT ); Fri, 26 May 2023 04:10:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF85A3; Fri, 26 May 2023 01:10:47 -0700 (PDT) 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=suhlTCSdjkwwCawJJF8xodaRhqnhkhv/03FtDn0nrOI=; b=tCeXdpnjIrisiE5m4fviMykCZM emIGqDMnuraL69ZBQClwz9W5TwOdaRmgfR3TYzCi0uVuuJEylosRLO2SvcUrkXpvuO9oqw+a0g3OT bAoqVzgmHhqAjOpBj3sjh6tt1ZFBzmPKiDvqzAH+lBJDcjJJ002eMMGJhFrsQksoEhM/uk0BYn3Il pgC1Vtgei1mUfCtfs49VBDMl+gfz08PWuZKP+2hjCQSbvl1uWsieaxq7tYicHez+vLZnxiSvVxgHw 7vYznUgGpMrWgtblFEOVASqAocMzPkZbbGE6mxSRdJED5Xjq02c8pmS0OGxm5fGsTWQG9pd1tbEbH jNjOnkZQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2SX5-001YtL-2n; Fri, 26 May 2023 08:10:43 +0000 Date: Fri, 26 May 2023 01:10:43 -0700 From: Christoph Hellwig To: Kent Overstreet Cc: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= , Christoph Hellwig , Jan Kara , cluster-devel@redhat.com, "Darrick J . Wong" , linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Kent Overstreet Subject: Re: [Cluster-devel] [PATCH 06/32] sched: Add task_struct->faults_disabled_mapping Message-ID: References: <20230509165657.1735798-1-kent.overstreet@linux.dev> <20230509165657.1735798-7-kent.overstreet@linux.dev> <20230510010737.heniyuxazlprrbd6@quack3> <20230523133431.wwrkjtptu6vqqh5e@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 25, 2023 at 07:20:46PM -0400, Kent Overstreet wrote: > > > I'm absolutely not in favour to add workarounds for thes kind of locking > > > problems to the core kernel. I already feel bad for allowing the > > > small workaround in iomap for btrfs, as just fixing the locking back > > > then would have avoid massive ratholing. > > > > Please let me know when those btrfs changes are in a presentable shape ... > > I would also be curious to know what btrfs needs and what the approach > is there. btrfs has the extent locked, where "extent locked" is a somewhat magic range lock that actually includes different lock bits. It does so because it clears the page writeback bit when the data made it to the media, but before the metadata required to find it is commited, and the extent lock prevents it from trying to do a readpage on something that has actually very recently been written back but not fully commited. Once btrfs is changed to only clear the page writeback bit once the write is fully commited like in other file systems this extra level of locking can go away, and there are no more locks in the readpage path that are also taken by the direct I/O code. With that a lot of code in btrfs working around this can go away, including the no fault direct I/O code.