Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp986478pxb; Tue, 26 Oct 2021 00:12:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyShv1WusQfU/wcqXw4Bv3irw23GumpirD78SxA62QIaQ38enc/8XCEV4YKT1vfQ2i4v2Jn X-Received: by 2002:a17:903:1ca:b0:141:5d5f:6a5a with SMTP id e10-20020a17090301ca00b001415d5f6a5amr238081plh.10.1635232371330; Tue, 26 Oct 2021 00:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635232371; cv=none; d=google.com; s=arc-20160816; b=0SyBg7bMyrfI+MqXbvaPO67BzQmE5wLNu7qdswkTer8zYZIHOboudVTYOhJmHE4HSs Hme+LTBsH3wEyZ19c7g/7q2QhpoIEeFHo240lA9UDr0MSRbj0/JQwut1txw4Nh2EQzy1 9NR4x2hzb+ZLsNMhdAE1amLImexpDNencZbIobuGJprdwvViM0D21WH8bg+BmjgLb3ji Oy/NHcb5sIBoYcO9Sj6V4Wh156NyQXDvkOr6hV0VMKlnck948WdTPv16wrf7udSudqry 6b47mZSh9aQo793G5GS1RsuKoce1VvL6Zy5hOYaWI8nnQKhsvxT7EmecJ9/mi49au3ah LK/A== 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; bh=PSE1GC22eP+lC/r4SOpwlzXN3AuSc2fTlrRo6hbJmq0=; b=B02AQe112ds2eq1GguXhZ3/mEfx89M73t6vXA0XjJxAlI4dyPL8DvG7MhIMfCwOiQu ojTCcE+BhVjFcj5WZigo+CKG8lN/wnUg7p4izMtO6/LcpF4OSY6sNQFxNhFIFomwm6zb GK9sGifUSSaDuO4uFgTEGs+WHYqRG8rt2cxGort63iK41NwdUa1W2jRL0VsMeHxZXqMY gLWAI+qvEqNVrptO19E49xtTv4hdY0kbXVvP8OOMnbjxfugYx4NEosDKuxi6mcxIIhiP DSj+AtSLplSVRel+qm+IoYssirp1IxUHBKciyZOkau6/5yrakqEGjLM0uMStVmoO1DNO AKsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ns12si3646683pjb.41.2021.10.26.00.12.37; Tue, 26 Oct 2021 00:12:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234865AbhJZFQM (ORCPT + 99 others); Tue, 26 Oct 2021 01:16:12 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:54457 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234445AbhJZFQK (ORCPT ); Tue, 26 Oct 2021 01:16:10 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 19Q5Crw3021006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 01:12:54 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id C967515C3F84; Tue, 26 Oct 2021 01:12:53 -0400 (EDT) Date: Tue, 26 Oct 2021 01:12:53 -0400 From: "Theodore Ts'o" To: Andreas Gruenbacher Cc: Catalin Marinas , Dave Hansen , Linus Torvalds , Paul Mackerras , Alexander Viro , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel , linux-fsdevel , Linux Kernel Mailing List , ocfs2-devel@oss.oracle.com, kvm-ppc@vger.kernel.org, linux-btrfs Subject: Re: [PATCH v8 00/17] gfs2: Fix mmap + page fault deadlocks Message-ID: References: <20211019134204.3382645-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 25, 2021 at 08:24:26PM +0200, Andreas Gruenbacher wrote: > > For generic_perform_write() Dave Hansen attempted to move the fault-in > > after the uaccess in commit 998ef75ddb57 ("fs: do not prefault > > sys_write() user buffer pages"). This was reverted as it was exposing an > > ext4 bug. I don't [know] whether it was fixed but re-applying Dave's commit > > avoids the performance drop. > > Interesting. The revert of commit 998ef75ddb57 is in commit > 00a3d660cbac. Maybe Dave and Ted can tell us more about what went > wrong in ext4 and whether it's still an issue. The context for the revert can be found here[1]. [1] https://lore.kernel.org/lkml/20151005152236.GA8140@thunk.org/ And "what went wrong in ext4" was fixed here[2]. [2] https://lore.kernel.org/lkml/20151005152236.GA8140@thunk.org/ which landed upstream as commit b90197b65518 ("ext4: use private version of page_zero_new_buffers() for data=journal mode"). So it looks like the original issue which triggered the revert in 2015 should be addressed, and we can easily test it by using generic/208 with data=journal mode. There also seems to be a related discussion about whether we should unrevert 998ef75ddb57 here[3]. Hmm. there is a mention on that thread in [3], "Side note: search for "iov_iter_fault_in_writeable()" on lkml for a gfs2 patch-series that is buggy, exactly because it does *not* use the atomic user space accesses, and just tries to do the fault-in to hide the real bug." I assume that's related to the discussion on this thread? [3] https://lore.kernel.org/all/3221175.1624375240@warthog.procyon.org.uk/T/#u - Ted