Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp432103rdh; Thu, 23 Nov 2023 07:48:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPSjkvmFgxpEMz+XTRu7aeoK1RN+pyu+l1lJ+0XeU0ZHP2yl21h97fQuFgwl8TMbhkfZ/3 X-Received: by 2002:a17:90b:33cf:b0:285:24bf:eef3 with SMTP id lk15-20020a17090b33cf00b0028524bfeef3mr5493189pjb.40.1700754494476; Thu, 23 Nov 2023 07:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700754494; cv=none; d=google.com; s=arc-20160816; b=bOOW3nr5poCUWlw9lhwcAXaoAyPxe3QiWV9qksrH0jwRI/72UrTaYsYLR/qgwRKcEW qLyJbKW4Lx3J6OX1+MGQCCtE/2zCJo6t495yipKoy+mh4diphMtX/9t4W7sf2YUv3o2i Q+qHMqAybTdkbRvSfGWh2ooGVrl5UhUjxUUV/eW/V0DOPTEtrm7j+ejR1FZCb5BmNfr6 y9m4VVfiBThGQookm3JSlp558AD3svAQvMxwHcl6l6QW0w7w3RkYwT17Oj2a8ibg+WVN 0rpHNTM0Yv+XyE1ixYhAWf/Xdy3beaIrBZlhMvGdKqoRBkaMHZGvhv4+pTAvWON36Wn2 6r2g== 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=vasH22+ZqE7NawyIR92P5uPhDSRcq1ysNxbjToJ1LBY=; fh=l6qSP7vqscHZeKrNR84vopEtgzTv0AZh4nhaONSssW0=; b=c94qKAfSXJakU4Ulpb91sOmtfYGeWa1wPoJYAuUex8Km8IeHpw2vMfwLbZ5GVlC0zg VNDk3jxMfVFVAxQbfSLZPJIp+S/rZh/Cd6VnvA0YUagszUOYI2fMuOy/f2GoaEcEafJz MXM6q7rz4zIRVAQK/i1MS14YlJiZ8u4zGpCTmjfAUfPnIf4F2m2o/ih0JIA0TXnQyXPm fYOykWYzahwt2KgENIFH0ySqC9MGPiMheQhY9B+4N4rgF9hohb4wQQBUWL28HwcRliSH YheyMdAelDBqN3YtwAN1Vja/KzQunLiheJbDHwdMooiANxWFTr1DzpSnuahx/6O3hgb5 UYIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vLpbgGiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x93-20020a17090a6c6600b0027d60ad5caesi1517001pjj.110.2023.11.23.07.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:48:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vLpbgGiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 527948068E17; Thu, 23 Nov 2023 07:48:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346170AbjKWPrw (ORCPT + 99 others); Thu, 23 Nov 2023 10:47:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346072AbjKWPrv (ORCPT ); Thu, 23 Nov 2023 10:47:51 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA0DC1 for ; Thu, 23 Nov 2023 07:47:57 -0800 (PST) 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=vasH22+ZqE7NawyIR92P5uPhDSRcq1ysNxbjToJ1LBY=; b=vLpbgGizfUkL6qUgpsivl4JAm/ l8J8tNyrQHt5ij+7+mH22jvJHwKDnm15G+Y8yMTDvxK5gRlnADcaWJ0gGwXnEL+X6/fGctU+gIkgH i7e0bTPjn5mArHPGmVnZ3Sd4irNBwcAJX3hcvaGLJPXbWqYn15n3uPyDZxtwkLGiuzrZBSL0W3h7g 0NnaVmbnZK083gVv5tpkKKqa2NiGaBEqg1aGsZitgcpovI9OR2AvH5HpmcbdwkXTFME1UrDr2MgzP GZEnBpDtPaOAgDKKUAZp8G4YTEUeZWMFnI74HVPypN/duW75NVuUCoPbRlM89yKGH7bN101Tg5qlt qowOlYxw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r6Bvh-007gJ1-SR; Thu, 23 Nov 2023 15:47:49 +0000 Date: Thu, 23 Nov 2023 15:47:49 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: Peter Xu , 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 , 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-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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:48:06 -0800 (PST) On Wed, Nov 22, 2023 at 12:00:24AM -0800, Christoph Hellwig wrote: > > 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. It looks like ARM (in the person of Ryan) are going to add support for something equivalent to hugepd. Insofar as I understand hugepd, anyway. I've done my best to set up the generic code so that the arch code can use whatever size TLB entries it supports. I haven't been looking to the hugetlb code as a reference for it, since it can assume natural alignment and generic THP/large folio must be able to handle arbitrary alignment. If powerpc want to join in on the fun, they're more than welcome, but I get the feeling that investment in Linux-on-PPC is somewhat smaller than Linux-on-ARM these days. Even if we restrict that to the server space.