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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93AABC2B9F4 for ; Tue, 22 Jun 2021 18:37:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2960C61289 for ; Tue, 22 Jun 2021 18:37:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2960C61289 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0F27D6B005D; Tue, 22 Jun 2021 14:37:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A4516B006C; Tue, 22 Jun 2021 14:37:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E60086B006E; Tue, 22 Jun 2021 14:37:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id B00A76B005D for ; Tue, 22 Jun 2021 14:37:09 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EF90F824999B for ; Tue, 22 Jun 2021 18:37:09 +0000 (UTC) X-FDA: 78282216978.23.F9AFC09 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id 89F239002388 for ; Tue, 22 Jun 2021 18:37:09 +0000 (UTC) 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: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Jq3BKYpc; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 89F239002388 X-Stat-Signature: ardwq6ximbmfmt6mjzegmexnjoe6sjj8 X-HE-Tag: 1624387029-206188 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?