Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp696944iog; Fri, 24 Jun 2022 11:59:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tvONFDQ0SE++nX7FxAbSopWL07sjeLODbsuVe1TJkO1ahQDjIbhp4WgXNatYwPWQodah0s X-Received: by 2002:a17:90a:c718:b0:1eb:af0e:36fd with SMTP id o24-20020a17090ac71800b001ebaf0e36fdmr5679165pjt.99.1656097172523; Fri, 24 Jun 2022 11:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656097172; cv=none; d=google.com; s=arc-20160816; b=ZEJGH1+aBzPRJd0ygCKHFgLc8kviHi3wXCAT0G0rd69W0VKCBH9ILTk4uLOP212HGW YI4cukFcSVWp1EDpXKutANpCkj5gkbFZbmCIueWoJrxXUaFLpbOGGq96yetUIkpNtGgv K5wso6f6IOUJ6AaEQF8VhR2CdVuKnRteg95tDmNzgCS8Y4BqXjEoocDf0Y6cyjwG5pSD UE8mC8Si7F4YreBoEMbfWFhBJfilotYKUWXfP85MrCsDwqDZeqSDY+DFzdknYg7ZNwUM yB2nwL0AAu/1BNch84FT9ut+ibT3PWkT9jFxRvCuTDtKZ+0614pa9Vn1XSEzBgJ7Aob6 T09Q== 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=QR+nifWaJ4UF5IaBqn3DWa9vzF87dPVKtCb+08H2uZA=; b=QVEDUyOCdY/PvS4v6ApMHlQiS6elOP0vpTV+qjER/U9slXSfHova8iAVpEMnNcL3ps YbQd0VaTw/nxCvnVQogdif7OJXzCXJDVyh7W2G0i/LCllKdTy6PmbAWErbn46ncibILz ULL6uRIOOJeivR6t2VqDJhlKIgk3Sl85BSOQuWUgSi9FyMORg10DPruHq0LKRseOKtvl An+rv0gQ7arbzM1dq9Ms3UW9hbKJOIjGjeRp+x+r4oVfMq9lh4CC2DZpePJt/pzdaGI8 V13m6wnf8J0DbisINvrTtLsmm0ewU3xxWGC6PKAv3zq/KsHyFivGm4Y4sC6oZEwN+SCv yzfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iDGZrrX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a656412000000b0040d12968067si3765954pgv.129.2022.06.24.11.59.01; Fri, 24 Jun 2022 11:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iDGZrrX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232002AbiFXSrr (ORCPT + 99 others); Fri, 24 Jun 2022 14:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbiFXSrn (ORCPT ); Fri, 24 Jun 2022 14:47:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CB481707 for ; Fri, 24 Jun 2022 11:47:42 -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=QR+nifWaJ4UF5IaBqn3DWa9vzF87dPVKtCb+08H2uZA=; b=iDGZrrX8g5o5JDPxxBqIqo/DoF JE07AoUkxnNArMhjxqm5fVdIFFt425RkLHWTzxrx0AmeVlc7SnUrY8e+7pFKozJege+9CvgYoDg+d 90aCEZ+tO1b9dQFN4GKebYwrg97l7hqqk9AgcYXZlYOR/CuFkjLOFuIEoprG5lz9x0vYEJT8ktTci lmMcqwG4gi1bvQq0cT1Hi+SCduelEKW3vUJDS9bTOQ5uwMvioENHBJs+CVUye0Jx+0g5x3+BX0DGR ezB7KhwtezZBTOvnEs/zSXq4C+kgbLib0h3ev6vsZ7No5QJTW9+87kUw1acI+eQHjXh5s0yugvT6t C69AplGQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4oL3-0099kP-9L; Fri, 24 Jun 2022 18:47:29 +0000 Date: Fri, 24 Jun 2022 19:47:29 +0100 From: Matthew Wilcox To: James Houghton Cc: Mike Kravetz , Muchun Song , Peter Xu , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Jue Wang , Manish Mishra , "Dr . David Alan Gilbert" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 00/26] hugetlb: Introduce HugeTLB high-granularity mapping Message-ID: References: <20220624173656.2033256-1-jthoughton@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220624173656.2033256-1-jthoughton@google.com> 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 On Fri, Jun 24, 2022 at 05:36:30PM +0000, James Houghton wrote: > - Page table walking and manipulation > A new function, hugetlb_walk_to, handles walking HugeTLB page tables for > high-granularity mappings. Eventually, it's possible to merge > hugetlb_walk_to with huge_pte_offset and huge_pte_alloc. > > We keep track of HugeTLB page table entries with a new struct, hugetlb_pte. > This is because we generally need to know the "size" of a PTE (previously > always just huge_page_size(hstate)). > > For every page table manipulation function that has a huge version (e.g. > huge_ptep_get and ptep_get), there is a wrapper for it (e.g. > hugetlb_ptep_get). The correct version is used depending on if a HugeTLB > PTE really is "huge". I'm disappointed to hear that page table walking is going to become even more special. I'd much prefer it if hugetlb walking were exactly the same as THP walking. This seems like a good time to do at least some of that work. Was there a reason you chose the "more complexity" direction?