Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4955168pxj; Tue, 22 Jun 2021 11:39:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtkPp6I0EAyNlcBeY3bCqLYn7gVIkuQtLwVvuKDy0cmp6vilOYSHZm/WH4E6vA0w96cXCi X-Received: by 2002:a92:c80b:: with SMTP id v11mr56060iln.256.1624387140654; Tue, 22 Jun 2021 11:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624387140; cv=none; d=google.com; s=arc-20160816; b=EPNW5K8YMY75BXlUo0yNanuMSyDSiV5ObymIcqFGtSA63A4xb67AQA4y9Ft6z2AOGY TQ0+0tT6EFcBv7K1tj3kaxicI6jYgPavA4DPYQnyngR9fYjhDPxWJTCK5nchBEwu10X1 fyrnQVwTG/rRfKEPbLn3KL63fmTFIBktOTdHGyB6ZR55FAXFetoiatBfWSFFSx5UQH+q AADPelGuXGI2BW12xik5gbyLyjSsiirtxZlcPY93yGSgiAMaegCp39Lg6H3PGKCRQW5Y byslM0myhljolNa2daHUVy/mc2H5pXomt+gkHeU+luaq5nXEHjy0ssrQZ4f6OOKL3jBB Er9g== 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=ZyyOQJC5AkmlnIUMiV1fpY23WHIZqnkcqStd28Qh6PI=; b=RGOqgOCm2QDCFUfOWXCLWmx4jNNyfCaTql4evCzlMZCLVGVLZeLiiSVK29lrG9JjsA fjd4FLvz1dzLvgAsXkt4aNewlYxfN3XNQriUXYb6Wo1uR1wlDCW1P7Zo4wpWW4G7bPCM cxqQxYWBpm2dFCvh3aB+0+gAxS/MAP3uphpCBkTTqpBvk4s/IhdmKvpULC60P7D8yp2f hUxlyFP84Hz51GQoXJ3tCl1fssNsNq8stihnp72Ec2oaO+GRI0RIvq7mX4+RijYNy+/5 MtNesV9sFfHjPNGa9BOd3T4bfHQIMnxAsWZFgNE/GGncQWGd0q4KkOSuP6Vgg3BRtUAu P9xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Jq3BKYpc; 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 s13si147036jat.111.2021.06.22.11.38.48; Tue, 22 Jun 2021 11:39:00 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Jq3BKYpc; 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 S232596AbhFVSjh (ORCPT + 99 others); Tue, 22 Jun 2021 14:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232376AbhFVSjf (ORCPT ); Tue, 22 Jun 2021 14:39:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74E02C061574; Tue, 22 Jun 2021 11:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=ZyyOQJC5AkmlnIUMiV1fpY23WHIZqnkcqStd28Qh6PI=; b=Jq3BKYpcGxlCzsbHxXq+Pr9zgU ei3KP85EWqFj2ho5yopI3JYR+LSNafUe28wTQ6Y6ui+v+wbDQ+lsHIhySNRIJxxTbdLenk4ggAViZ O2c9pow5liOMzC8D0FSQdGKnaPABHJTyvL/oyNp1rxY109jSwyBCBnd5Q/KeyEobme5+/hgAV94MC 1vLXyxV3Yh+9uyezHDBYC4KGM4sd3hKPzgfaiD9Pobe8HdfPYojrDWlh8Z5gCz/OFDgXjAUxwQcbW AhDJY35HL5SMXZ4V4M+PREJGPKX2Zw4auyVRezgQDwCyGZ6j7nCugUjhpw0FTwamZSCbU5qOgX1or 0xmCjeZQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvlG6-00Ed9x-Jm; Tue, 22 Jun 2021 18:36:32 +0000 Date: Tue, 22 Jun 2021 19:36:26 +0100 From: Matthew Wilcox To: Linus Torvalds Cc: David Howells , Al Viro , Ted Ts'o , Dave Hansen , Andrew Morton , Linux-MM , Ext4 Developers List , linux-fsdevel , Linux Kernel Mailing List Subject: Re: Do we need to unrevert "fs: do not prefault sys_write() user buffer pages"? Message-ID: References: <3221175.1624375240@warthog.procyon.org.uk> <3231150.1624384533@warthog.procyon.org.uk> 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 Tue, Jun 22, 2021 at 11:28:30AM -0700, Linus Torvalds wrote: > On Tue, Jun 22, 2021 at 11:23 AM Matthew Wilcox wrote: > > > > It wouldn't be _that_ bad necessarily. filemap_fault: > > It's not actually the mm code that is the biggest problem. We > obviously already have readahead support. > > It's the *fault* side. > > In particular, since the fault would return without actually filling > in the page table entry (because the page isn't ready yet, and you > cannot expose it to other threads!), you also have to jump over the > instruction that caused this all. Oh, I was assuming that it'd be a function call like get_user_pages_fast(), not an instruction that was specially marked to be jumped over. Gag reflex diminishing now?