Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp520826imm; Fri, 5 Oct 2018 07:35:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV61d4nnU1SEGa2ZpzSPBlnrfg3snbTBV0ha+TnCTQQVhyk7OaGdmPoqVs8NK5/ZHpz3jaZJI X-Received: by 2002:a62:cac4:: with SMTP id y65-v6mr12197705pfk.27.1538750139965; Fri, 05 Oct 2018 07:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538750139; cv=none; d=google.com; s=arc-20160816; b=sVS0La2jP5Uv9wLO/rbw5py6piubupONIs0KTc9S2sje458t636NqaRvgZ3U/+1p+c czG4QjXT1lV0DUMPx4e3ZfFoQXKjbqeXHUH6yTg+IqDdm0rQThSnORshA7Z9QZIhh1J5 53bDrq3ah5ebm4vqw3lVMqifqYO5JOYlVZDT8QZFSc5wBxxJdSr523UQBq6db6Z/8b8I uuJNpN65C3qZ4qX9lsIi+X2nqABnOndUiwdTtxu6gvMcdawuEvnPYEEHp9ONP6aGlJSs A+VDx0gHpabm8Qm9Q4r/tMlUU/x4FUgmGavMrN7m84B8w8wiEXx5ZgqVgRHrqreYfB8I FNeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=nKo/YPEV4xGZXL6t4GLn6L1WpA5Bt5r+mZ+46ps0AfE=; b=TtP/t+kw8J2j7lRTq/YY+djiMC13+LfRX09DTxB+iefsGJDJyyDvY3Bm8VIKY44/Dw qKt2rk/N+deLypBy2QM1pDJQBcjBsMMpCPdFvT47l2/UpWHy9fuP7dnVVYwVoWSYbovO eJ1+4CxMp2dn4tlXMUBJiBfDHf7NlNoeUVQ/W0l0mvrDeE33M/BiWFcUup2mQdVw3ADM SHcqL1LujNt3NxJ3ROd3hcBwMUkwF4yfO5I6GGzUsuSG54GZAqABu9t1gQNyBThvbCqv UJ0DGgDAonfzGehBOEHi1HcPmxHD3DJco5i6SWiF5URjWwBNBhQcyb0HiDdUOsymI8Hx ngMA== 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 33-v6si9474808plv.241.2018.10.05.07.35.24; Fri, 05 Oct 2018 07:35:39 -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 S1728944AbeJEVeK (ORCPT + 99 others); Fri, 5 Oct 2018 17:34:10 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52852 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728899AbeJEVeJ (ORCPT ); Fri, 5 Oct 2018 17:34:09 -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 D37EA80D; Fri, 5 Oct 2018 07:35:10 -0700 (PDT) Received: from localhost (e105922-lin.emea.arm.com [10.4.13.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4EE493F5D3; Fri, 5 Oct 2018 07:35:10 -0700 (PDT) From: Punit Agrawal To: linux-doc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, steve.capper@arm.com, Punit Agrawal , Catalin Marinas , Will Deacon , Jonathan Corbet Subject: [PATCH] Documentation/arm64: HugeTLB page implementation Date: Fri, 5 Oct 2018 15:34:58 +0100 Message-Id: <20181005143458.17875-1-punit.agrawal@arm.com> X-Mailer: git-send-email 2.18.0 X-ARM-No-Footer: FoSSMail Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 +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 +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 +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 -- 2.18.0