Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5351470rwd; Tue, 23 May 2023 23:56:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6pqp5J8yh7Q8wP2ljjoejyrUHqOdMjRlh8DQ/at239Cdg/EjRHBAT9jRLdibF36KsJmKIJ X-Received: by 2002:a17:90a:8c03:b0:252:977e:c257 with SMTP id a3-20020a17090a8c0300b00252977ec257mr17644722pjo.23.1684911386207; Tue, 23 May 2023 23:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684911386; cv=none; d=google.com; s=arc-20160816; b=E/HL0hVxoi4CEW/ZKaTOPv+a/VuX82WyhJ99/Ryev8tPuXNS6+dWfHMf2/SGRUPN1T Oiup+lqyy9qPLw2d2J9I+htv7ouVRFo+5Hw2fmOZXV26VL5/hFZ/uig5HBSqCk3BfFRz EC2qxn/NtbLKxkQ82R3okH2qnPVhtmWqI7BDD+Rpv1RAFS04AvwnhWHO+P5FFygvwdf6 c0+E8I8QgoeHnjla/0FVNgc/h+zjuLC5p2zA4GWLfIrqY0am8KeUT1bMa/c1EtBf+MoI Kqwru1iezvKtA+rZ3MePo+0GYfDOHOs3D9vSE+zQp+/CIBnUUeGGHBDeHqin7Ibld0QT V35Q== 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=x8PYhGTrPAt9NKG8UKKxEtkvRfE8xvv8TBO5S8oegQs=; b=IZpofVeHPiSzxMsDjaJKcSzIa5L/tbTzziJ5ZBwhqIjrjcxk9k3AQ5TNgDkz0SSsei CIBejUrYBv6ruuMfiZ/iBqSNXCGUlKSPDYAK/JQvWenzCkEPhdQBFqey+HHJq7jz/7PD l4nu6mfMeOK6LOKDy35ufcHl+HVXdyyGq3M+ElUp7maWnOiQQlyx0pV9g6Z/A7pPSG10 bwg3sCqA2WEw/BJr/H8gyLT6frPW19yiQCGDNZV52xHYY/z5icF7DaD9/T48CxUpxxZe aRbJ/XpFY1zeHxEwhTReRdoahhc/LdCUqK3dJ48hga442b7SiZHb1loMFJJhitsldYiC loVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CN4s7kEI; 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 a64-20020a639043000000b00530b7ce3d34si6215276pge.305.2023.05.23.23.56.13; Tue, 23 May 2023 23:56:26 -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=CN4s7kEI; 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 S239581AbjEXGp2 (ORCPT + 99 others); Wed, 24 May 2023 02:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239872AbjEXGo7 (ORCPT ); Wed, 24 May 2023 02:44:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BD191FCA; Tue, 23 May 2023 23:43:36 -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=x8PYhGTrPAt9NKG8UKKxEtkvRfE8xvv8TBO5S8oegQs=; b=CN4s7kEI5PCARtpXP47dqHFQS/ vIt1hQeojTucws3q9J4RyMTGKDZau5CMHFMnIbOx47u7ODqLJK73E39uw/C7Cav+B+9ajUvaFaDJm rJY3rXUQ/gOZCiDAyoHMyrRJzZ4WWkrjpfoiu60Hbvn45XZk7aX7jsQLTRtzpp+axW7G1qzEbYxzQ F9buDGL2mpULh+qnIvHyZkzivfChIZr1eAOUPLPpigx/mk00bl3wWlKpCmBS0vpzEYpqUcOCvRcuW C42sBZHTlt6A9noZYQkz1x7PHJapsJ66UrbJniCKf2ecH677bC+z/HgwZudimJiH7NFrzfxP+qsOK fhNlGAug==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1iDc-00CWNR-0L; Wed, 24 May 2023 06:43:32 +0000 Date: Tue, 23 May 2023 23:43:32 -0700 From: Christoph Hellwig To: Kent Overstreet Cc: 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 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 Tue, May 23, 2023 at 12:35:35PM -0400, Kent Overstreet wrote: > No, this is fundamentally because userspace controls the ordering of > locking because the buffer passed to dio can point into any address > space. You can't solve this by changing the locking heirarchy. > > If you want to be able to have locking around adding things to the > pagecache so that things that bypass the pagecache can prevent > inconsistencies (and we do, the big one is fcollapse), and if you want > dio to be able to use that same locking (because otherwise dio will also > cause page cache inconsistency), this is the way to do it. Well, it seems like you are talking about something else than the existing cases in gfs2 and btrfs, that is you want full consistency between direct I/O and buffered I/O. That's something nothing in the kernel has ever provided, so I'd be curious why you think you need it and want different semantics from everyone else?