From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3150CCA473 for ; Fri, 24 Jun 2022 18:47:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0EA928E0266; Fri, 24 Jun 2022 14:47:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09AF88E0244; Fri, 24 Jun 2022 14:47:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA3948E0266; Fri, 24 Jun 2022 14:47:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D61EE8E0244 for ; Fri, 24 Jun 2022 14:47:41 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A12C834768 for ; Fri, 24 Jun 2022 18:47:41 +0000 (UTC) X-FDA: 79614013122.02.0EB44A1 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id B8811140023 for ; Fri, 24 Jun 2022 18:47:40 +0000 (UTC) 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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656096461; a=rsa-sha256; cv=none; b=6H0aF9eWZgsYYQ3hFxOdYqOpOQWPhztwbectAxpwKAtCP1ghB0VwHBIfL5N1N/MIxGCm4a jVj0zn6UY9jjjR7tlJKH969TTe2Ko7YN3t+yShhqi88BZy4zK38bMcQBZ0zHlTDdJsVZOR hJu2R3k+mqO/u/IK5p3jaxvbHbEjkQI= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=iDGZrrX8; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656096461; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QR+nifWaJ4UF5IaBqn3DWa9vzF87dPVKtCb+08H2uZA=; b=qyNUcy3Edg51qRg6YSHgascdz9gbliwyuPQol6ir8Hcvy/Kz5EHupexOcEGLH2sbLptYUs 9uq3dAefLGsmVmAH8k4FHKZeN6TTtvk1tqi1KehThIhR46J5AjdWH8CFCpu+ptW4LLNHX6 PUouOjIep1AiNiZGIM8y466UMnOzSsc= X-Stat-Signature: rpy54mw6xb6sjq6uctu17m7kobfnarzy X-Rspamd-Queue-Id: B8811140023 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=iDGZrrX8; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1656096460-878638 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?