Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp923057rdf; Wed, 22 Nov 2023 00:00:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYo6Cgd0lo0XEy+zwwIYzHQUAe6DTaS4n6fTGQxp5R+Bglfdw86ltyBgdMT/Kr7F0g3H2s X-Received: by 2002:a05:6808:ec4:b0:3b6:c4dd:be83 with SMTP id q4-20020a0568080ec400b003b6c4ddbe83mr2165065oiv.52.1700640047011; Wed, 22 Nov 2023 00:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700640046; cv=none; d=google.com; s=arc-20160816; b=lyiJjoYLnuZT59TQdS4YVO3FBQaZCh6kpZ9koXFU3j3e5npSV/1s6nwtF8p0Zc5jHs UU623didvXaw1XK3vzNMSZdYo8Hs02gISSzzbj7weTtJtHMKx/IJ3UnjySygP/0jAjwv wQZj7RznxLggCapet9+uQkoOsVUBTBxKZT+ia3bxf5Dy359nGY2TkkTGMsb+4uYJ9f13 uvuLhvxgTQfiOUrlz6bbIkKX9S4/dL8RqK+ai1RzwJnapIX7gYVDQ6VZODddV9zX9vsA 0WyVL5cgXgHhUEqeSWIap3HSSi86stwnqGR29r3cEbaR/VKUWcnezp2I2muTrZTRClEH RVgQ== 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=rG9CnI6rb1E9NFvnbYt1RG2l2gXTlO1XMx7PoiRe2Ec=; fh=aiWfLqNB1nW4d+5DAG94r7xEKj3Qw2ufUrVCkpTGo54=; b=KZGzkyqvojCY/qZAH5ufQY1T8h4ZM+MgnF4FVbIcEfLsO5zXD0lXnQCcaFmire51ao 2zWepkLbMt8y/4DM5XN2cSkiHMOmRg7X7156ZbDggzJygkbPielTH7eowpLGMd/s9OY2 bt/OqfgxZBJFiFaO1RySOsV2mTSKsGUKpgks8mu+7bogcd/KdBblL3/nsCj68kpF/eSs JfZWn9wgw9qfmaZfVxdVRq7hxhUK8Jp99JfSpKxg+CROYSZxe8fgy3MBWr/NQUdRG3sa fK5AdcQE16v1Xc9aU35DH4bAQI/7jfTOj6irxQk5oaAv4FPp2VLS9SvnSF8AOFBJE8cb MMmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PCtBrTBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id az6-20020a056808164600b003b2f363bbcasi4458925oib.96.2023.11.22.00.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 00:00:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PCtBrTBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id CF333808726D; Wed, 22 Nov 2023 00:00:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjKVIAc (ORCPT + 99 others); Wed, 22 Nov 2023 03:00:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbjKVIAb (ORCPT ); Wed, 22 Nov 2023 03:00:31 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A099D for ; Wed, 22 Nov 2023 00:00:27 -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=rG9CnI6rb1E9NFvnbYt1RG2l2gXTlO1XMx7PoiRe2Ec=; b=PCtBrTBvxv7SOp8UE5vFdvbfF0 P5NaPlXmpvqNViNINDPdipO0w9S7846a/jfPx/chfTBwwTwYjneEH25vRgUw635dBIYYVnMCDmiM6 OeTvKWjvS5RPTRtLFJM8VWWVC1A3xvPIQ+lpajb19q+Chh4kjK5j81FkX1DAOmUYdLz8CY2/xQjU/ eHO+ESOk90z7nvlFOUb/rkbJstkzzg3x3vrH7Vvfk96TWlMZ6TRu1MnpeRKEUoHL7WMK53ciD/Y6Q bdvOGQ2aAG+0OYv9E7rZOWLEOZLfUmhAOJwT7XbQn2p/6gB5NGOg/D88uulBsscSZ7PfrfCGM1nAw u/zzeo7A==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r5i9o-000z5V-1I; Wed, 22 Nov 2023 08:00:24 +0000 Date: Wed, 22 Nov 2023 00:00:24 -0800 From: Christoph Hellwig To: Peter Xu Cc: Christoph Hellwig , 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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 00:00:39 -0800 (PST) On Tue, Nov 21, 2023 at 10:59:35AM -0500, Peter Xu wrote: > > 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. > > But then it means we're still keeping that dead code for fast-gup even if > we know that fact.. Or do we have a plan to add that support very soon, so > this code will be destined to add back? The question wasn't mean retorical - we support arbitrary power of two sized folios for the pagepage, what prevents us from using hugepd with them right now? > The other option is I can always add a comment above gup_huge_pd() > explaining this special bit, so that when someone is adding hugepd support > to file large folios we'll hopefully not forget it? But then that > generalization work will only happen when the code will be needed. If dropping the check is the right thing for now (and I think the ppc maintainers and willy as the large folio guy might have a more useful opinions than I do), leaving a comment in would be very useful.