Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp440866pxb; Thu, 9 Sep 2021 04:39:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/VVyQxqPJJzHVr9jye0P0z8J4D54YMyoUyBWHSNI49lkyiIIXKLv3kOALIsTFgXYlLstO X-Received: by 2002:a6b:b4d3:: with SMTP id d202mr2311172iof.8.1631187564264; Thu, 09 Sep 2021 04:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187564; cv=none; d=google.com; s=arc-20160816; b=UwSlpdyF/R19SFiSQIu7XpGfZdM5BQxnFsNcpGw6l6ljGeqdWNkxCjzJ55mO4Kkmpm gxeAu89OgHo38OaYv6Hpd1PTXwCJgPqurCKRO+mnM1m7XVQZuEClOxiSgcheHoV6bIRL OoQtZdf/wnWuTKhfUJyJYXXgoO+ZyCPh6nLllLLYCaI7m/iaM84PqgIQAoKix9huEL7u 4eZ6Jb0Z0ns2OFBhfKcRlIk8UzuHjc0SX/ZwuZjrHcaFAmvWAAMlj1z7EmmKDwClVGSp 1+Y4ItAXBBXWehSGAftgERgrh+eoAzAylEn/mB70/EmQ0xCfzBcQvRadA/4Szf+MvtJX wh8Q== 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=fPS8ABV3p1/Cc6qzU5y4vmmF2vrRk2q/3Li1BJ3OVOY=; b=EaxF5vQ3Ekn681ReeBJPPPCVZACfyMx7UKkh5Ux14FYQsZLHirbpY7eURL8G93RD4g dAmjOOeuwyeD3uaNDhvZwfe3BMQQOjqCGbdJyopNNToyMaDTecMisLqcCCecvuWoghhv iNTZFK5txejCrsqePlB55bmi/CQsLtd7c+NuS+5PzjvZWjO0EEjxDbizsTQXJoQF9+W3 sf4rm55UxxzJ5uXNzIlbdlHqqrfj7F9dL443VsNHfvRN2v2JilcMBDsDj2esWYX7N7Cz DNDHdrof3dCJlps6yVCFVNEGT9kpy0raXakM7AiJZbRO8ExF7wZr1B80SLSudcoAro71 GIXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H+oBGp3J; 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 h22si1458225jal.57.2021.09.09.04.39.11; Thu, 09 Sep 2021 04:39:24 -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=H+oBGp3J; 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 S235674AbhIILi3 (ORCPT + 99 others); Thu, 9 Sep 2021 07:38:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234507AbhIILi2 (ORCPT ); Thu, 9 Sep 2021 07:38:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6464AC061575; Thu, 9 Sep 2021 04: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=fPS8ABV3p1/Cc6qzU5y4vmmF2vrRk2q/3Li1BJ3OVOY=; b=H+oBGp3JjF8wCD9YKCIWRjD64D c60kA8H4/8JfQVuMOPr92UZYsMgK52eScn3cIUBTeoQegGP9sC+esrf01Ayo532kOnaRWDsJfxX34 tQYy9TkblQiC3kXLfKE4W0NHrOuZU1vDOmi3lKigJ4Dk8VFULHA5N/FFYfQc4vZWozbvNcRRIybaV BIW6H8sO1w4QetEH/L5auibNq8VcVVWR6NYM0x31uxGCIot9ez9zRri0dmFrj9LfGnPqsfvmONPgf EqlbuknP5VNqDpcMZWYZ+hyTF8H3hBNHcpd9AlkLwkYE/8cRbPdxd5mVc1xKKMSdT9oxesP+cN5BE KAB524LA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOILm-009lu0-R5; Thu, 09 Sep 2021 11:36:19 +0000 Date: Thu, 9 Sep 2021 12:36:14 +0100 From: Christoph Hellwig To: Andreas Gruenbacher Cc: Linus Torvalds , Alexander Viro , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: Re: [PATCH v7 17/19] gup: Introduce FOLL_NOFAULT flag to disable page faults Message-ID: References: <20210827164926.1726765-1-agruenba@redhat.com> <20210827164926.1726765-18-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210827164926.1726765-18-agruenba@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 27, 2021 at 06:49:24PM +0200, Andreas Gruenbacher wrote: > Introduce a new FOLL_NOFAULT flag that causes get_user_pages to return > -EFAULT when it would otherwise trigger a page fault. This is roughly > similar to FOLL_FAST_ONLY but available on all architectures, and less > fragile. So, FOLL_FAST_ONLY only has one single user through get_user_pages_fast_only (pin_user_pages_fast_only is entirely unused, which makes totally sense given that give up on fault and pin are not exactly useful semantics). But it looks like they want to call it from atomic context, so we can't really share it. Sight, I hate all these single-user FOLL flags that make gup.c a complete mess. But otherwise this looks fine.