Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4924251pxj; Tue, 22 Jun 2021 10:57:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxopuhS8AjDlPKnpyUX9VHfC6Af8V9iFyD+dTpB8SbIRQtMh9wG1kFMxpwjJuPEO65O/4lO X-Received: by 2002:a17:906:bc2:: with SMTP id y2mr5257526ejg.489.1624384622623; Tue, 22 Jun 2021 10:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624384622; cv=none; d=google.com; s=arc-20160816; b=P7qYw8C7g5EPLJ36MM54kHtGplou+Ry/7j8ZCNQTqBB1O41rDnGTzPXUu2RdQ/XXe/ XnC+EluY8TT7bnpuKhs0VxTHQ2dRJxBlf2Gyk+Mc48e0tEKoN1si6anrWOrDFsSYfLQw 388ligeXPD+uAVdAuyARe/iR1Gy5tD4cBSgDrpHFek0sJVfz60xu1+Qt4p8J1ak9tOM9 LLZNYQghCvkwTt4yiounlk3hpynrYsR+2fro0Vkr3JECvRVFlBKja8EZgmRPLLXm2PU/ GAUhNnx7UcXpMluC1a+HlpSuhzvtq6/v070cQCmiJf/pYI5mGsYJp55PRvqJcLBTrjld VdWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=vPJfqiVwirjPo+JOKJqBMtufCCULee1n+PUuD036/84=; b=Gni71emzl4KoDc599tnDwpWY8xUQt6NWBq6NUzEJInnwPGq0JtL0cc3Hpq/itv5eFT uzs+F8H8x8yQKTte2qGb3bY2h+u1OmAnL0uOe6OAgE9agl3MvEQruZK8hGqUde8EiqRC ra66q09IoovSZLCBRdVE1rjCGuwSZyWKCpwOva0Xdxx7hbj+tucU2CoURG/a/D+d268A n4gzXh6Cn/Y48WMdciVSmC2G56rXon4Xj8zmvquV2aTYHrSMYN8FLa2s6yVlbJw2Q8Au qMWPYvVqOOUQXAcO72pUnHNoTaZ2Guwe7GUyg43laIDgjml/pTx2Jn4VWOg8imTMDnAU eCKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LNqYMMEw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx10si14927233ejc.376.2021.06.22.10.56.39; Tue, 22 Jun 2021 10:57:02 -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=@redhat.com header.s=mimecast20190719 header.b=LNqYMMEw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232266AbhFVR56 (ORCPT + 99 others); Tue, 22 Jun 2021 13:57:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50657 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbhFVR55 (ORCPT ); Tue, 22 Jun 2021 13:57:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624384541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vPJfqiVwirjPo+JOKJqBMtufCCULee1n+PUuD036/84=; b=LNqYMMEwTzFgxZ6GjgX3C1gCk3cMfkbAvole+GFYP5cQJr46uQZRZHazF6/3GW9syLNXrX Fwx3VJhSbDctkJhrPSRdtN1ibsZhN9gsTGJ8dLJPuzXBYICXpiFyuU6cJc5HWaJ1gbwQE+ gPRAVHUcy9bBeaedRtdXwNgpJmlJHSg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-yQ7dfMfDPMONm30mH858Aw-1; Tue, 22 Jun 2021 13:55:39 -0400 X-MC-Unique: yQ7dfMfDPMONm30mH858Aw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BB440804140; Tue, 22 Jun 2021 17:55:37 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-118-65.rdu2.redhat.com [10.10.118.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABF055D9CA; Tue, 22 Jun 2021 17:55:34 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <3221175.1624375240@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, Matthew Wilcox , 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"? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3231149.1624384533.1@warthog.procyon.org.uk> Date: Tue, 22 Jun 2021 18:55:33 +0100 Message-ID: <3231150.1624384533@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > End result: doing the fault_in_readable "unnecessarily" at the > beginning is likely the better optimization. It's basically free when > it's not necessary, and it avoids an extra fault (and extra > lock/unlock and retry) when it does end up faulting pages in. It may also cause the read in to happen in the background whilst write_begin is being done. David