Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2177878pxb; Thu, 3 Feb 2022 00:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu1Y6PWG5vSKcU8Rl2PkmZQYFQw9wmKrF2/CxcdNeI10zrtbI8KBwnzeXF3YRd4ixyEYBV X-Received: by 2002:a17:907:7da4:: with SMTP id oz36mr16457503ejc.416.1643877458692; Thu, 03 Feb 2022 00:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643877458; cv=none; d=google.com; s=arc-20160816; b=ePZut5Z1CSIuUapTl5j9jqrsEqfBkvqDy0PzFj5NqMmNH+gS/zu+FFt8HIyK1Shbdq C0rUEU803UtnyDwESJy3+2bYTZZbv/R9j0L+vVcblFWtSkjHRv99f/cGAmvKT8Ep9Hqw Z/SheeE5B7af8RHmNRheSaebPi2SjIzlTXjLQDPU+YzuAREgYOEqHNClDzxRCEY1d2oL j61l17qzeHPHFORr27zdqOVdnTM9EKiKHEwkyjWs3SW88csDK+PEjgV86AmWal4TH7bQ BbI+XbiWI48h/Tpix8g8tqXWp+xZOeODz9DkmjhHj9ccmeUc85K5QEBD4Y4++gCG/588 sc7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7FJI9cxvw91D3nHE/77fnkMXwVmLpQSxMXB/yC1y9jU=; b=fpGH1q2ZAw7bNss4zQ0Sh2wF1b0Dqsm1ui6bq93mTEVmEaBewm2H6zkpTcYc+j2D0a jFipshWDCyRhjOJu7udurEbZd1XIelhlJ78+85zVdPUiI59mN7an//Ge7/i8m0zXmO6S MuywtCc71MmKCcSKcUnVHdNAx1nXXds88bL/U45/FSobVCJxyMEpee/6kV+YdlMwzRbb OsMWKIAW5mfMo/nlKyQX/s0GQVZuj1fHbNFEOzKL5/b6jblkNRHzcHnGfJuhwNqi3/0/ ExtVTzq3o59i+6+pp8A/aMLUKkic6DsSnjUStAIcrjg36BFELJZb2LFiPvHYyDBoiF0O 5FBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OK3+ceKp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb43si12942137ejc.154.2022.02.03.00.37.13; Thu, 03 Feb 2022 00:37:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OK3+ceKp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235849AbiBAJyj (ORCPT + 99 others); Tue, 1 Feb 2022 04:54:39 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:44884 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234247AbiBAJyi (ORCPT ); Tue, 1 Feb 2022 04:54:38 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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