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 B1B49C433EF for ; Tue, 14 Dec 2021 10:39:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1EC236B0071; Tue, 14 Dec 2021 05:39:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19B906B0072; Tue, 14 Dec 2021 05:39:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08B576B0074; Tue, 14 Dec 2021 05:39:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id ED34D6B0071 for ; Tue, 14 Dec 2021 05:38:59 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A4F6086338 for ; Tue, 14 Dec 2021 10:38:49 +0000 (UTC) X-FDA: 78916051578.12.1E75FA0 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf25.hostedemail.com (Postfix) with ESMTP id 8155FA0018 for ; Tue, 14 Dec 2021 10:38:45 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id F3D571F3C3; Tue, 14 Dec 2021 10:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1639478328; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i6n+Du2Wanh5ToBgLy61lXqvAYk0Hql+XD6WjB+onmA=; b=UgpMzDjzqvaqK2eA8pYmdzyJA0o5cKaOXihZC1qXCviolEqlmHU9K2C33kzegRjwuBL3Xl Y5K0fR/h2rCZugKxiVIFnQbPMU0w6JNSKurue3ZFBaIQmrQHvuttIhV4gspgj2iPsXdWne aaB+Ik7drz9CSfkPopO6Y9n0TJGPelo= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id BAD29A3B84; Tue, 14 Dec 2021 10:38:47 +0000 (UTC) Date: Tue, 14 Dec 2021 11:38:47 +0100 From: Michal Hocko To: Christoph Lameter Cc: Andrew Morton , David Hildenbrand , Alexey Makhalov , LKML , linux-mm@kvack.org, Dennis Zhou , Eric Dumazet , Oscar Salvador , Tejun Heo , Nico Pache Subject: Re: [PATCH v2 2/4] mm: handle uninitialized numa nodes gracefully Message-ID: References: <20211214100732.26335-1-mhocko@kernel.org> <20211214100732.26335-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 8155FA0018 X-Stat-Signature: 8b1sdcsdtomwpp7qdqkef7yoay9tbusx Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=UgpMzDjz; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam10 X-HE-Tag: 1639478325-265065 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-12-21 11:33:41, Christoph Lameter wrote: > 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. This is certainly possible but also it is more complex. I aim for as simple as possible at this stage. The reason I am not concerned about memory overhead so much (even though the pgdat is a large data structure) is that these unpopulated nodes are rather rare. We might see more of them in the future but we are not quite there yet so I do not think this is a major obstacle for now. -- Michal Hocko SUSE Labs