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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5F6BC7EE23 for ; Wed, 24 May 2023 06:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239627AbjEXGpb (ORCPT ); Wed, 24 May 2023 02:45:31 -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 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?