From patchwork Thu May 6 15:26:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 12242451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DAD6C433ED for ; Thu, 6 May 2021 15:27:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A73E061988 for ; Thu, 6 May 2021 15:27:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A73E061988 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 41DDF6B0075; Thu, 6 May 2021 11:27:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F4C96B0078; Thu, 6 May 2021 11:27:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 271E26B007B; Thu, 6 May 2021 11:27:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id 089A36B0075 for ; Thu, 6 May 2021 11:27:22 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B07338249980 for ; Thu, 6 May 2021 15:27:21 +0000 (UTC) X-FDA: 78111185082.17.7ED8C74 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by imf19.hostedemail.com (Postfix) with ESMTP id 32A8990009DE for ; Thu, 6 May 2021 15:26:49 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id E4276580B9A; Thu, 6 May 2021 11:27:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 06 May 2021 11:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm3; bh=0Vqh/12D+7ItZ 7+wzTeDhhxcr5RV//7A5m31qLjOfhE=; b=BkIRKQSF6Dj8QO06+XBWBvzR5nZik byXGdMgWl3jqK4k07zyusfxS8vwwBDf3X8JVIyGTHojUCrO/pqmnXZYwAEdtPG0H xJGZA7QD07YPi3V/NMj7MiFrot7KDNjvh47wE8VEAYoRYgVFYS8lWv0Dj6H8ZLIg RyDDax4M1r5NV/NeVqNzLk3iSOVCTej2v7AObHUrTAJ4euJTQZhtn7O3spb9Ai65 rvKVUjvfjYtg0CAplyv5jPDw1rE2F3N1+de9tDp0L9kY8aZ8igSp8Dmn9QNVhVqI P6qyAtpw5SKHltxVmiHt5RbY2wzaq7jzZpprjAQDmSAxLP3N/ywCr6p2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=0Vqh/12D+7ItZ7+wzTeDhhxcr5RV//7A5m31qLjOfhE=; b=csxIPwzr uonvNWIgSug9hpDXXfqy4EzlgPzuRdyfFxsm8km04obBGxRyJPAJKc1zadJpqFw8 xBtdwrq4dZ7jTDkVZpvMZ6P9OEZsNBkYWBA+0boS0zvBT2j/WiSfsug1FFpaWnQl 1BT25nopWrPRsCDc0sKIN8YkY2+t4JK1biwATAYCPZSe6YmWJZRlfVSwzPfsuKz7 UAHZctYWYsW3cCHhyRjllbxtI0XoxBBruJxbVbf8JKVB1yR6pxHVckG7kXe7+nnq r8i15j/XQSk9IrDc9woctBo7NDyxhwqc2L+BwH0NVPlkT5y8Bq5WHgpowuMnJjaF m6SJ4+pFlsE3MQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegtddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfrhgggfestdhqredtredttdenucfhrhhomhepkghiucgj rghnuceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepieejue dvueduuefhgefhheeiuedvtedvuefgieegveetueeiueehtdegudehfeelnecukfhppeef hedrudeigedrvdegiedrfeegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepiihirdihrghnsehsvghnthdrtghomh X-ME-Proxy: Received: from Threadripper.local (ec2-35-164-246-34.us-west-2.compute.amazonaws.com [35.164.246.34]) by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 May 2021 11:27:16 -0400 (EDT) From: Zi Yan To: David Hildenbrand , Oscar Salvador Cc: Michael Ellerman , Benjamin Herrenschmidt , Thomas Gleixner , x86@kernel.org, Andy Lutomirski , "Rafael J . Wysocki" , Andrew Morton , Mike Rapoport , Anshuman Khandual , Michal Hocko , Dan Williams , Wei Yang , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, Zi Yan Subject: [RFC PATCH 7/7] [not for merge] mm: increase SECTION_SIZE_BITS to 31 Date: Thu, 6 May 2021 11:26:23 -0400 Message-Id: <20210506152623.178731-8-zi.yan@sent.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210506152623.178731-1-zi.yan@sent.com> References: <20210506152623.178731-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=sent.com header.s=fm3 header.b=BkIRKQSF; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=csxIPwzr; spf=pass (imf19.hostedemail.com: domain of zi.yan@sent.com designates 66.111.4.230 as permitted sender) smtp.mailfrom=zi.yan@sent.com; dmarc=pass (policy=none) header.from=sent.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 32A8990009DE X-Stat-Signature: qj15wbs4665m9fnqg6696igmkfcc6dop Received-SPF: none (sent.com>: No applicable sender policy available) receiver=imf19; identity=mailfrom; envelope-from=""; helo=new4-smtp.messagingengine.com; client-ip=66.111.4.230 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620314809-334919 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: From: Zi Yan This is only used to test onlining/offlining subsection memory in a x86_64 system by increasing section size to 2GB and pageblock size to 1GB when MAX_ORDER is set to 20. Signed-off-by: Zi Yan --- arch/x86/Kconfig | 15 +++++++++++++++ arch/x86/include/asm/sparsemem.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0045e1b44190..d8faf59fa5ff 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1654,6 +1654,21 @@ config X86_PMEM_LEGACY Say Y if unsure. +config FORCE_MAX_ZONEORDER + int "Maximum zone order" + range 11 20 + default "20" + help + The kernel memory allocator divides physically contiguous memory + blocks into "zones", where each zone is a power of two number of + pages. This option selects the largest power of two that the kernel + keeps in the memory allocator. If you need to allocate very large + blocks of physically contiguous memory, then you may need to + increase this value. + + This config option is actually maximum order plus one. For example, + a value of 11 means that the largest free memory block is 2^10 pages. + config HIGHPTE bool "Allocate 3rd-level pagetables from highmem" depends on HIGHMEM diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h index 6a9ccc1b2be5..c5a9d498a7e7 100644 --- a/arch/x86/include/asm/sparsemem.h +++ b/arch/x86/include/asm/sparsemem.h @@ -23,7 +23,7 @@ # define MAX_PHYSMEM_BITS 32 # endif #else /* CONFIG_X86_32 */ -# define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ +# define SECTION_SIZE_BITS 31 /* matt - 128 is convenient right now */ # define MAX_PHYSMEM_BITS (pgtable_l5_enabled() ? 52 : 46) #endif