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 D1A23C433F5 for ; Tue, 1 Feb 2022 09:54:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D5DA6B017D; Tue, 1 Feb 2022 04:54:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 485CC6B017E; Tue, 1 Feb 2022 04:54:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 373EE6B017F; Tue, 1 Feb 2022 04:54:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 277136B017D for ; Tue, 1 Feb 2022 04:54:40 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CBF2780EBFB1 for ; Tue, 1 Feb 2022 09:54:39 +0000 (UTC) X-FDA: 79093751478.21.07EB87D Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf19.hostedemail.com (Postfix) with ESMTP id F01F01A0007 for ; Tue, 1 Feb 2022 09:54:38 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9451921116; Tue, 1 Feb 2022 09:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1643709277; 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=7FJI9cxvw91D3nHE/77fnkMXwVmLpQSxMXB/yC1y9jU=; b=OK3+ceKpCEpfce0DrAtdzfQNGqoQMXar021mgX/b8fYs23BP8g7WrRYOzVk1RP2jeWH8sg jbhwR8PIEfh5QlPJnTO+6wn4aTWZc9/SoCLi4Hm3pC//FjUXgWOiowUKO/4Q8ur62hGjaU F7IiB70yiYVIJfr8RZf17lqZXVPMDx0= 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 7EE18A3B83; Tue, 1 Feb 2022 09:54:37 +0000 (UTC) Date: Tue, 1 Feb 2022 10:54:37 +0100 From: Michal Hocko To: Wei Yang Cc: Mike Rapoport , Andrew Morton , linux-mm@kvack.org, LKML , David Hildenbrand , Alexey Makhalov , Dennis Zhou , Eric Dumazet , Oscar Salvador , Tejun Heo , Christoph Lameter , Nico Pache , Rafael Aquini Subject: Re: [PATCH 2/6] mm: handle uninitialized numa nodes gracefully Message-ID: References: <20220127085305.20890-1-mhocko@kernel.org> <20220127085305.20890-3-mhocko@kernel.org> <20220201024119.2ailcw4rp5thambz@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220201024119.2ailcw4rp5thambz@master> X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: F01F01A0007 X-Stat-Signature: zzw17ocmjquze8znatn9ycrquonkcjnk Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=OK3+ceKp; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf19.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspam-User: nil X-HE-Tag: 1643709278-319775 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 01-02-22 02:41:19, Wei Yang wrote: > On Thu, Jan 27, 2022 at 03:47:40PM +0100, Michal Hocko wrote: > >[...] > >> > + > >> > + /* Allocator not initialized yet */ > >> > + pgdat = arch_alloc_nodedata(nid); > >> > + if (!pgdat) { > >> > + pr_err("Cannot allocate %zuB for node %d.\n", > >> > + sizeof(*pgdat), nid); > >> > + continue; > >> > + } > >> > + arch_refresh_nodedata(nid, pgdat); > >> > + free_area_init_memoryless_node(nid); > > free_area_init_memoryless_node() seems to be defined used out side > page_alloc.c? It just call free_area_init_node() directly. We want to use the > name to reflect the effect? yes. > >> > + /* > >> > + * not marking this node online because we do not want to > >> > + * confuse userspace by sysfs files/directories for node > >> > + * without any memory attached to it (see topology_init) > >> > + * The pgdat will get fully initialized when a memory is > >> > + * hotpluged into it by hotadd_init_pgdat > >> > + */ > > Hmm... which following step would mark the node online? On x86, the node is > onlined in alloc_node_date(). This is not onlined here. The comment tries to explain that this happens during the memory hotplug. Or maybe I have missed your question? [...] -- Michal Hocko SUSE Labs