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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35E12C433EF for ; Wed, 25 May 2022 17:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245620AbiEYRMW (ORCPT ); Wed, 25 May 2022 13:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231668AbiEYRMU (ORCPT ); Wed, 25 May 2022 13:12:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D58A6C578 for ; Wed, 25 May 2022 10:12:17 -0700 (PDT) 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 DA619B81E72 for ; 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.