From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AE76C433EF for ; Wed, 25 May 2022 17:12:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD29D8D0003; Wed, 25 May 2022 13:12:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D80EC8D0001; Wed, 25 May 2022 13:12:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6A5D8D0003; Wed, 25 May 2022 13:12:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B860A8D0001 for ; Wed, 25 May 2022 13:12:17 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8784635558 for ; Wed, 25 May 2022 17:12:17 +0000 (UTC) X-FDA: 79504908714.01.7CFC778 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf30.hostedemail.com (Postfix) with ESMTP id C43258000D for ; Wed, 25 May 2022 17:11:47 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C401FB81E3F; Wed, 25 May 2022 17:12:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C99CC385B8; Wed, 25 May 2022 17:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653498734; bh=M7O1KvFOnWHpUH/SeIbxBs641FWxON2L2DiS0ElqKes=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hAwq605fjdy0WSolawr16YguVkRAsRLnwQJIGZuCWRMgLuL4JsZnVv12q3WyxZKIi ZVeA7HMu75GGajheowimTU79XVLoMKwG6LpR2Jhg8QPBwBBUzHKHlE8K6ppg1xQur/ TlwRwsKlEMVcH9Aq9B07doMfytciHjqDJVM/fHDjS2lclJHJGwKgzb7tdwFo/YQMTB 2ZGmWf9uu/aDZBvBtIIequ4wnwzFKVvR3RCcpezp481tdS7ba6J/OKD1QtPvhILsh/ sWVqDguJpF6GEoNpe54wqbmkTnlm1SYYvTEZExZjiX7a7Ax4GxayJndA4Artv+Fxw0 8SwnBbRVkCfkQ== Date: Wed, 25 May 2022 20:12:07 +0300 From: Mike Rapoport To: Darren Hart Cc: "Zhouguanghui (OS Kernel)" , Andrew Morton , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "xuqiang (M)" Subject: Re: [PATCH] memblock: config the number of init memblock regions Message-ID: References: <20220511010530.60962-1-zhouguanghui1@huawei.com> <20220510185523.3f7479b8ffc49a8a7c17d328@linux-foundation.org> <73da782c847b413d9b81b0c2940ab13c@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: C43258000D X-Stat-Signature: szoa9e3rch5qgshordqwxcbmgwz937x1 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hAwq605f; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1653498707-558356 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: On Wed, May 25, 2022 at 09:44:56AM -0700, Darren Hart wrote: > On Thu, May 12, 2022 at 09:28:42AM +0300, Mike Rapoport wrote: > > On Thu, May 12, 2022 at 02:46:25AM +0000, Zhouguanghui (OS Kernel) wrote: > > > 在 2022/5/11 14:03, Mike Rapoport 写道: > > > > On Tue, May 10, 2022 at 06:55:23PM -0700, Andrew Morton wrote: > > > >> > > > >> Can we simply increase INIT_MEMBLOCK_REGIONS to 1024 and avoid the > > > >> config option? It appears that the overhead from this would be 60kB or > > > >> so. > > > > > > > > 60k is not big, but using 1024 entries array for 2-4 memory banks on > > > > systems that don't report that fragmented memory map is really a waste. > > > > > > > > We can make this per platform opt-in, like INIT_MEMBLOCK_RESERVED_REGIONS ... > > > > > > As I described above, is this a general scenario? > > > > The EFI memory on arm64 is generally bad because of all those NOMAP > > carveouts spread all over the place even in cases without memory faults. So > > it would make sense to increase the number of memblock regions on arm64 > > when CONFIG_EFI=y. > > This seems like a reasonable approach. I would prefer not to have to increase > the default for EFI arm64 systems (and all that entails with coordinating with > distros, etc.). The point below about other arch's not needing this is a good > one too. This seems like a reasonable way make the defaults work everywhere > while only paying the price on the systems that require it. There's already v2 of this patch: https://lore.kernel.org/all/20220517114309.10228-1-zhouguanghui1@huawei.com > -- > Darren Hart > Ampere Computing / OS and Kernel -- Sincerely yours, Mike.