Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3359517imm; Mon, 8 Oct 2018 02:39:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV62pUjkpwKtL3WajsUPzfRj07CixPFPk/zgBr1MyXeF+PTwvu0DB2EN2Ixo7o8Q82Ruy4PxF X-Received: by 2002:a62:6081:: with SMTP id u123-v6mr862219pfb.7.1538991581641; Mon, 08 Oct 2018 02:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538991581; cv=none; d=google.com; s=arc-20160816; b=KXEpwyQKUcZTfySOeQ63RmlhKg5tzCqqJ9PyUEw6VcHoBFms7NoDVVeO7RrDUA2X8v 8uZzowmz6pwYIz3+dxL4JJQ4y+7yoAeglQvsKUd/hgFqNdeJaDNq6h+ownLzuIXrALaS Sn+HR4sZK22Npx0D9UeJcXhfQ85AHqvNRCTotpLmQ89/4o6PYiW4hzkHmYjl6dm4Wd98 Di59UY9aRckgeY2QqBRW8glv/oUwMpBxra6uEiXvqrt9fPZSVcbpATZtKEB5RqPHMo95 MZU+/7kv2alaIuI5jPWxz+PtR7szmf79wu+2Z7Le8ujgyxmVYqdlU43NN2QXWyqsZmgT Hfvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=1aVqdke7cmQLpG+t0VOh+q4YZJYHAq98XR3T2qfirJI=; b=eNTFLNj3Z99TH7qZ+REKJpATGX3nw8mN7yCeM5CN5xre1ZsDipIJHEb+YDPrZ0CdtH +gCwc3+BHrK4MENCJYgSMy4vGh5W7C9bJFpqsAuc2KEDKA4FAy3WwYZBvT/rEb8Wxnfz 5PM7jzRWA/4rH/MMzEYBcDYF3/ONvvvjEMk0UMO+Sb6N2xxZov/+WN4V3vQ+/62lzals Zz92E6PITWybR1n2JTg2Kt0pxXOdxXXUSE/u8w9UI2z+1e6uj5gmKWSy8lvNa7iKb2Ob W+AwX8IeNH1FDzlMLZS4rdG7bHTFYzDRPKw0BbEbnheIzQJlj8xM52ISmir1SVSIVhOP tkPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12-v6si17243559pgj.87.2018.10.08.02.39.26; Mon, 08 Oct 2018 02:39:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727623AbeJHQuB (ORCPT + 99 others); Mon, 8 Oct 2018 12:50:01 -0400 Received: from foss.arm.com ([217.140.101.70]:46532 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbeJHQuB (ORCPT ); Mon, 8 Oct 2018 12:50:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0F8C67A9; Mon, 8 Oct 2018 02:39:12 -0700 (PDT) Received: from localhost (e105922-lin.cambridge.arm.com [10.1.197.25]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7DB03F5D3; Mon, 8 Oct 2018 02:39:11 -0700 (PDT) From: Punit Agrawal To: Randy Dunlap Cc: linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, steve.capper@arm.com, Catalin Marinas , Will Deacon , Jonathan Corbet Subject: Re: [PATCH] Documentation/arm64: HugeTLB page implementation References: <20181005143458.17875-1-punit.agrawal@arm.com> <97e4e5fb-24ed-0545-414a-6a0c0116e6b8@infradead.org> Date: Mon, 08 Oct 2018 10:39:10 +0100 In-Reply-To: <97e4e5fb-24ed-0545-414a-6a0c0116e6b8@infradead.org> (Randy Dunlap's message of "Sat, 6 Oct 2018 09:30:19 -0700") Message-ID: <871s90u69t.fsf@e105922-lin.cambridge.arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Randy, Randy Dunlap writes: > Hi, > Just some minor stuff (below). > > On 10/5/18 7:34 AM, Punit Agrawal wrote: >> Arm v8 architecture supports multiple page sizes - 4k, 16k and >> 64k. Based on the active page size, the Linux port supports >> corresponding hugepage sizes at PMD and PUD(4k only) levels. >> >> In addition, the architecture also supports caching larger sized >> ranges (composed of multiple entries) at the PTE and PMD level in the >> TLBs using the contiguous bit. The Linux port makes use of this >> architectural support to enable additional hugepage sizes. >> >> Describe the two different types of hugepages supported by the arm64 >> kernel and the hugepage sizes enabled by each. >> >> Signed-off-by: Punit Agrawal >> Cc: Catalin Marinas >> Cc: Will Deacon >> Cc: Jonathan Corbet >> --- >> Documentation/arm64/hugetlbpage.txt | 39 +++++++++++++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/arm64/hugetlbpage.txt >> >> diff --git a/Documentation/arm64/hugetlbpage.txt b/Documentation/arm64/hugetlbpage.txt >> new file mode 100644 >> index 000000000000..64ee24b88d27 >> --- /dev/null >> +++ b/Documentation/arm64/hugetlbpage.txt >> @@ -0,0 +1,39 @@ >> +HugeTLBpage on ARM64 >> +==================== >> + >> +Hugepage relies on making efficient use of TLBs to improve performance of >> +address translations. The benefit depends on both - >> + >> + - the size of hugepages >> + - size of entries supported by the TLBs >> + >> +The ARM64 port supports two flavours of hugepages. >> + >> +1) Block mappings at the pud/pmd level >> +-------------------------------------- >> + >> +These are regular hugepages where a pmd or a pud page table entry points to a >> +block of memory. Regardless of the supported size of entries in TLB, block >> +mappings reduces the depth of page table walk needed to translate hugepage > > reduce > >> +addresses. >> + >> +2) Using the Contiguous bit >> +--------------------------- >> + >> +The architecture provides a contiguous bit in the translation table entries >> +(D4.5.3, ARM DDI 0487C.a) that hints to the mmu to indicate that it is one of a > > preferably MMU > >> +contiguous set of entries that can be cached in a single TLB entry. >> + >> +The contiguous bit is used in Linux to increase the mapping size at the pmd and >> +pte (last) level. The number of supported contiguous entries vary by page size > > varies > >> +and level of the page table. >> + >> + >> + >> +The following hugepage sizes are supported - >> + >> + CONT PTE PMD CONT PMD PUD >> + -------- --- -------- --- >> + 4K: 64K 2M 32M 1G >> + 16K: 2M 32M 1G >> + 64K: 2M 512M 16G >> I've updated the patch with incorporating your feedback and will post an update shortly. Thanks a lot for taking a look. Punit