Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2067723rdb; Mon, 20 Nov 2023 00:26:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQM1va6y/m5c6Dulf+RCJ4SIpQYUD+97M54D8Y7tdrxip9e7zxCpiU9deu3Mn9fTxacwg3 X-Received: by 2002:a17:903:1ce:b0:1cc:5306:e8a3 with SMTP id e14-20020a17090301ce00b001cc5306e8a3mr10210209plh.3.1700468815328; Mon, 20 Nov 2023 00:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700468815; cv=none; d=google.com; s=arc-20160816; b=Msz9Sx9xIFUPDsLWBpYSjjFQx4UBgD8vtypaocZCGGrXcsW35Za714dXX9OlVUFb+d t5EZGf5vZokfJtBwmhfVHz9E9ooQwZwDJ6NRRAP4Y1AEP5n2bjlGAJCgM713MJUaRZ4K PDoGx5ZnuO+7/tbECGRsP2RSdV6Vae+XQ8aKnWeOt2ON0KEPTyuU0dFJ4/HsYHRKEk1Q RZXe+chFcNcO44djMM7B7ITZtsT+aXzFzI4OiGIHSwSzaKn1GYhe2ZLDA6fRS/kT6vh3 Wra1I4V4r56BT1k9FoaVtAYB4bpeVeuUcWSGBnpejyvE4zWJVAaTgrgN365oa4abs/V7 mhvw== 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=uMp2fMZBMPCr8C/u9KI5jUF0TwPRUJ/bxniQfy1HXoM=; fh=MfNR/FeYnexa5PsDPK//ETFsaXeUi7/iZpM9/hChMiQ=; b=qa+3NrEQUjqd6od6hwsXW6M1aJ0dlObfhCbVz1/DnKOyqYn8ODoebgIlYxsBkiMOS7 zW1PnBstTOuwm89lMtKJPbTyqyyL4m4WrpOVwbUPYDNAL7t5UWSFkuflFJotc9XVojcx e8527s+G7McE+OOO1lUdDRAxkwlnszXvO+4Xgpz/WoZWFj2n0mOUlJxKq4Wf1thCYQDl O2ChMf4yssdmSpinl4DESXs9mz2rZ+Z6KCQVZpKpOu17Hj79pUrEtQsguhFmfoHcMdFR LEAtNnidrVGDKF2LqUBXT71CwdxOh1Sak3raq4Q+aWp6L64+nkJ8D9zlWnTQK1yTAT2o 6Lsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=p0fDRvzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bc10-20020a170902930a00b001cc4fbe9281si7155055plb.582.2023.11.20.00.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 00:26:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=p0fDRvzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5D9BD809F39C; Mon, 20 Nov 2023 00:26:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232066AbjKTI0e (ORCPT + 99 others); Mon, 20 Nov 2023 03:26:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjKTI0c (ORCPT ); Mon, 20 Nov 2023 03:26:32 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5961EB9 for ; Mon, 20 Nov 2023 00:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=uMp2fMZBMPCr8C/u9KI5jUF0TwPRUJ/bxniQfy1HXoM=; b=p0fDRvzTKV43hpBu0+sr2+Pz73 TZn39hehC2t56EK4IteS4aWT9jFaZ/21cuIc5qudV4m5Ud+NRJkwVpbq8c5J8qHTSB4a6MmJfMGQb UGdRc0QuQs7kP/u7CJn7pQQtY6YQ+YaY49Y8BXDregSPUnGGmRCcKYJDAwMO83hqWydxfVubHETSQ msAyW9/Ot5qrWxGUV5lWqNKOg6V804Rw4GUzSg+z910mQcNCcEQonRyGMY/ioEsmhcR9b9WezX2IK SZhguB0DFZGf+XBBLeKDx4/juMQhOMdzferrd/qZg8BsBikUOtQtsfl/e4DPxBeXe6NnJIRnwm8xr dyfRwizg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r4zbs-00BVBv-2U; Mon, 20 Nov 2023 08:26:24 +0000 Date: Mon, 20 Nov 2023 00:26:24 -0800 From: Christoph Hellwig To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrea Arcangeli , James Houghton , Lorenzo Stoakes , David Hildenbrand , Vlastimil Babka , John Hubbard , Yang Shi , Rik van Riel , Hugh Dickins , Matthew Wilcox , Jason Gunthorpe , Axel Rasmussen , "Kirill A . Shutemov" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport , Mike Kravetz Subject: Re: [PATCH RFC 06/12] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing Message-ID: References: <20231116012908.392077-1-peterx@redhat.com> <20231116012908.392077-7-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116012908.392077-7-peterx@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 00:26:47 -0800 (PST) On Wed, Nov 15, 2023 at 08:29:02PM -0500, Peter Xu wrote: > Hugepd format is only used in PowerPC with hugetlbfs. In commit > a6e79df92e4a ("mm/gup: disallow FOLL_LONGTERM GUP-fast writing to > file-backed mappings"), we added a check to fail gup-fast if there's > potential risk of violating GUP over writeback file systems. That should > never apply to hugepd. > > Drop that check, not only because it'll never be true for hugepd, but also > it paves way for reusing the function outside fast-gup. What prevents us from ever using hugepd with file mappings? I think it would naturally fit in with how large folios for the pagecache work. So keeping this check and generalizing it seems like the better idea to me.