Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3379512imm; Mon, 8 Oct 2018 03:04:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63x1ow6k0VS7mtGLRJaYy5QvacBpuVuvG7n4UTFX1ziMtFq4oUnCoS46btyZIHL/2AabGJt X-Received: by 2002:a62:d841:: with SMTP id e62-v6mr24303060pfg.60.1538993079544; Mon, 08 Oct 2018 03:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538993079; cv=none; d=google.com; s=arc-20160816; b=StVXQcFzy2B3QPYHW53DrjaMFQI5TXVCN5IRWM6NVRP/sXO8iir3RBhVZJGlsmRkFU GZlkBfz/steMVhdiIHgB1XwQpIDD/8dqZAstAoJp3SDXMrHOz+a0DaHYxJoXPGB0CbGr cC+wZz1GJYN+n+gB/CIrfZzWSueHdSE3XPEs30OuS2DLjcYRBfh0aC6OYW9Pc+zBjxY4 jiSfdYkQTrKDkjtqwgJu2ZmzgEqNNhvR5An2ZDoQa36uZacYP2bjp7okNNLB/27vX6wH fwMywTni65pr5sw87OMfVA1pShxzgHeZnuAJE1C7cdh8X8YJGh+Pxm5F33giSIh4lnMi abGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=08duk2RTapD1OY7mTKcMioj5Q2p+WyY9APAQ3vP+eGk=; b=QEXN34+4lnk2zwbHbpOmvbATkcJWRgovDqO6fSd2d7pxubOzTefhD+Bp0FEBbX4cJI vYgbqg13D1G8BZdQcOJMFmr0rpzl0LEG8J0v8lysElIyUA7hfDfvcvPadcQoNOaPuW77 wI5A0XnbmIStgf6xm7mPzcwMVy2HvkMnGL3BAdO+c80CjYdgUMuy5jKyKLyP/oOfIbvH rFebO5jLQ+43s2WVcy1j+fxa8XyndOCKLlXhS5Fwhcs5u+aI4bAWvQw0179QOusz3YI0 weg7Sc+TcHz0HmfONr+WbUrObjZlqcy+e+CdPHouYWSLfZZY0ZbLDXWWFa9+kK4FJMH9 E3FQ== 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 i10-v6si14354807pgb.71.2018.10.08.03.04.23; Mon, 08 Oct 2018 03:04: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 S1727094AbeJHRPA (ORCPT + 99 others); Mon, 8 Oct 2018 13:15:00 -0400 Received: from foss.arm.com ([217.140.101.70]:47016 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbeJHRPA (ORCPT ); Mon, 8 Oct 2018 13:15:00 -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 D6EC57A9; Mon, 8 Oct 2018 03:04:04 -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 578FA3F5D3; Mon, 8 Oct 2018 03:04:04 -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, rdunlap@infradead.org, Punit Agrawal , Catalin Marinas , Will Deacon , Jonathan Corbet Subject: [PATCH v2] Documentation/arm64: HugeTLB page implementation Date: Mon, 8 Oct 2018 11:03:55 +0100 Message-Id: <20181008100355.31820-1-punit.agrawal@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <97e4e5fb-24ed-0545-414a-6a0c0116e6b8@infradead.org> References: <97e4e5fb-24ed-0545-414a-6a0c0116e6b8@infradead.org> 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 --- Hi, This version incorporates the feedback on v1. Thanks, Punit Documentation/arm64/hugetlbpage.txt | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 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..cfae87dc653b --- /dev/null +++ b/Documentation/arm64/hugetlbpage.txt @@ -0,0 +1,38 @@ +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 reduce 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 varies 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