Message ID | 20230104130000.69806-1-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5124939wrt; Wed, 4 Jan 2023 04:50:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOak6RamEkAMPYkI5UvmyYYLoW00SF/AP3frKYhSKNHQ6i1lK6SMVUkUqePAQ/aEL7aqOR X-Received: by 2002:a17:902:ef8a:b0:192:607b:f691 with SMTP id iz10-20020a170902ef8a00b00192607bf691mr45456923plb.67.1672836612015; Wed, 04 Jan 2023 04:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672836612; cv=none; d=google.com; s=arc-20160816; b=c0J3tXmjzR02n6B4FRdDNnwKWKzKMJEDpQV+Xn4MuE10DVedPRHq+B2ifTEKMNiM8K 7SbP78FpHjdvln185ORcPqsGzUGpw2o63gkA8201BKxDRuT3xojSVHLMjAFdQXTyVkce XIbuuCVKcfwevdTtSrYKZ29mobIYo4LdxWk2v5wG2cmwFd9XaAlnwacGAB/AC19fuz5O RUMIFm4Rq6qUlvbWhobNs+RhJHLVY9omHPt0fxRULazHTbdOfas9uxX4FGs97SKdMB1R irkGRG2eHrwa3KP8uHPINDFQekvDXjxkCyd1z1nUAmvY/Ffz8UQSFnPFw2DoSqBOMxUk ChWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=EWGMnL3jXVAffk3q4JaJvRT2TXCb5kSPmu2MfbBi21U=; b=oY0uevqH7vFT0EjvEwakXHPILyJLdcGFJoRoHp0as88uHkGcy6VNuR8KZ5l/bjLxG0 0aO7YtTa1Wf4cimriC/IHUTp1DduZiWuupWAR/Id/beXugRtCvA7n6TZFKGP8LQ+x1QD slH63mQephubu3o0trkkG/9vFFB6zGZ78pOJqN2/JpBBb0ORwvzckiyAqfES4oFAO3Ns yerdMFENmatEV+Jai5RYq9QxYiAeGJyhUgjH63nXrvQX8AgQyY1kTETmQ2xpUsy9a4K1 S1y0sesPGekOp5O7Qa3itlCC8q3pWlEdJm9fysjlf8ErpCX3qTCtflDXooj4bHDNNLuz n0Fw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a170903230e00b001836e510540si21368147plh.114.2023.01.04.04.49.59; Wed, 04 Jan 2023 04:50:11 -0800 (PST) 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; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239229AbjADMoc (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Wed, 4 Jan 2023 07:44:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233514AbjADMo2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Jan 2023 07:44:28 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE48417E0F for <linux-kernel@vger.kernel.org>; Wed, 4 Jan 2023 04:44:27 -0800 (PST) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Nn8Ln5nVTzqTpb; Wed, 4 Jan 2023 20:39:45 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 4 Jan 2023 20:44:24 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH] arm64: make ARCH_FORCE_MAX_ORDER selectable Date: Wed, 4 Jan 2023 21:00:00 +0800 Message-ID: <20230104130000.69806-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754096323269724490?= X-GMAIL-MSGID: =?utf-8?q?1754096323269724490?= |
Series |
arm64: make ARCH_FORCE_MAX_ORDER selectable
|
|
Commit Message
Kefeng Wang
Jan. 4, 2023, 1 p.m. UTC
The other architectures with ARCH_FORCE_MAX_ORDER are selectable,
but not for ARM64, this is to make it selectable on ARM64, which
is useful for user that need to allocate more than 4MB of physically
contiguous memory with 4K pagesize, also more bigger on 16K pagesize
too, the max value of MAX_ORDER is calculated bellow,
see include/linux/mmzone.h,
MAX_ORDER - 1 + PAGE_SHIFT <= SECTION_SIZE_BITS
so max value of MAX_ORDER = SECTION_SIZE_BITS + 1 - PAGE_SHIFT
| SECTION_SIZE_BITS | PAGE_SHIFT | max MAX_ORDER | default MAX_ORDER |
----+-------------------+--------------+-----------------+--------------------+
4K | 27 | 12 | 16 | 11 |
16K | 27 | 14 | 14 | 12 |
64K | 29 | 16 | 14 | 14 |
----+-------------------+--------------+-----------------+--------------------+
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
arch/arm64/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On Wed, 04 Jan 2023 21:00:00 +0800, Kefeng Wang wrote: > The other architectures with ARCH_FORCE_MAX_ORDER are selectable, > but not for ARM64, this is to make it selectable on ARM64, which > is useful for user that need to allocate more than 4MB of physically > contiguous memory with 4K pagesize, also more bigger on 16K pagesize > too, the max value of MAX_ORDER is calculated bellow, > > see include/linux/mmzone.h, > > [...] Applied to arm64 (for-next/misc), thanks! [1/1] arm64: make ARCH_FORCE_MAX_ORDER selectable https://git.kernel.org/arm64/c/5a4c2a314083
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 03934808b2ed..22f0fb73a762 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1457,9 +1457,11 @@ config XEN Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64. config ARCH_FORCE_MAX_ORDER - int + int "Maximum zone order" if ARM64_4K_PAGES || ARM64_16K_PAGES default "14" if ARM64_64K_PAGES + range 12 14 if ARM64_16K_PAGES default "12" if ARM64_16K_PAGES + range 11 16 if ARM64_4K_PAGES default "11" help The kernel memory allocator divides physically contiguous memory