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 B179AC433F5 for ; Tue, 14 Dec 2021 10:34:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 414576B0071; Tue, 14 Dec 2021 05:33:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C4226B0072; Tue, 14 Dec 2021 05:33:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 28BF56B0074; Tue, 14 Dec 2021 05:33:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 16C206B0071 for ; Tue, 14 Dec 2021 05:33:53 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CE134869B5 for ; Tue, 14 Dec 2021 10:33:42 +0000 (UTC) X-FDA: 78916038684.27.0962DDD Received: from gentwo.de (gentwo.de [161.97.139.209]) by imf03.hostedemail.com (Postfix) with ESMTP id 71E2E20005 for ; Tue, 14 Dec 2021 10:33:42 +0000 (UTC) Received: by gentwo.de (Postfix, from userid 1001) id 34805B006DD; Tue, 14 Dec 2021 11:33:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id 32228B005DA; Tue, 14 Dec 2021 11:33:41 +0100 (CET) Date: Tue, 14 Dec 2021 11:33:41 +0100 (CET) From: Christoph Lameter X-X-Sender: cl@gentwo.de To: Michal Hocko cc: Andrew Morton , David Hildenbrand , Alexey Makhalov , LKML , linux-mm@kvack.org, Dennis Zhou , Eric Dumazet , Oscar Salvador , Tejun Heo , Nico Pache , Michal Hocko Subject: Re: [PATCH v2 2/4] mm: handle uninitialized numa nodes gracefully In-Reply-To: <20211214100732.26335-3-mhocko@kernel.org> Message-ID: References: <20211214100732.26335-1-mhocko@kernel.org> <20211214100732.26335-3-mhocko@kernel.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 71E2E20005 X-Stat-Signature: 1fjdshkxmt9eqnthckzwz7fokjezsypj Authentication-Results: imf03.hostedemail.com; dkim=none; spf=none (imf03.hostedemail.com: domain of cl@gentwo.org has no SPF policy when checking 161.97.139.209) smtp.mailfrom=cl@gentwo.org; dmarc=none X-Rspamd-Server: rspam10 X-HE-Tag: 1639478022-49208 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 Tue, 14 Dec 2021, Michal Hocko wrote: > This patch takes a different approach (following a lead of [3]) and it > pre allocates pgdat for all possible nodes in an arch indipendent code > - free_area_init. All uninitialized nodes are treated as memoryless > nodes. node_state of the node is not changed because that would lead to > other side effects - e.g. sysfs representation of such a node and from > past discussions [4] it is known that some tools might have problems > digesting that. Would it be possible to define a pgdat statically and place it in read only memory? Populate with values that ensure that the page allocator does not blow up but does a defined fallback. Point the pgdat for all nodes not online to that readonly pgdat? Maybe that would save some memory. When the node comes online then a real pgdat could be allocated.