Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp948180rdb; Thu, 15 Feb 2024 23:51:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4jPZ9ePlFH69eNshyXuEbx5pKvxNy/mM3OQCODc5ABEWhW/MCugtOlrOC23vXQ6XK6J3XYzmWjkiAPNrVegwx9JAG+vsbABfjft1e3Q== X-Google-Smtp-Source: AGHT+IGO6YMz2bFNed51DasTvPw+b9Of62oMinxt/m0F6XG1DE5jQzGa1FV1khO9hoVr3eIfjwXw X-Received: by 2002:a25:d3c6:0:b0:dcc:ec02:38b0 with SMTP id e189-20020a25d3c6000000b00dccec0238b0mr3664633ybf.64.1708069891980; Thu, 15 Feb 2024 23:51:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708069891; cv=pass; d=google.com; s=arc-20160816; b=U71iLSzJ+uGpP+4JQ+ZzYarPLFjnao87V+8Qy5iUdxkChbo35emvIWK064IR7e7IHI aZFuf+bz5NDpXBKVeNPZih7iPSeGlDZh+pkbtXuxUG13UPN1S6yGCoITmlKJ/ODTH0ML Ww3PKjpIOFtCYhCDKmjkwGIAKIVdRi4YExWuRkbga/xEuUFA4kfrbB3BE7RJed6q4V8l E36/QZjEHoJxOCLDxEonlzuGU/llqW/L2GNsh+qok5VMf0g7si/8OInqGCbyBJyu2U5D ArlmTyfikd4f4qL5IuwWWVUyOSD8Yvb9PTXBwsHV0wruQjwY+r/Gbrn+TYNIsOjH15BJ ZUAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=T3kSRMNvYqoD1Oew8jvkJgmFhy+2180XepdgpQuG9JA=; fh=uOmlfVp8QCBOD+RYkKSqswXJq4ToUUsDV32JMSB+t5c=; b=Et2j2zSQGG8fbCKB+j/htm/QEc2UwuQoyUgje9BpZnoGxjy39hHCQa5YZaHKGXWxed u7k/CEjXnxQPiMDfCHh9l1UMQ9HjAmqFrIHbeEVSpmEFoYbu7/EdlGzdbyKjQ8SIXiNA pr0Hq7P2wjKyfxX+xnggpNeZz3irNt71X3TzwiAChPW3fvNtm+L+Qpr/naUSI9a0A9Tc znR/jSuUEqtrNwFhwF7hEYnSkzNvKqH60z7yCX+hN5T0Z69ewGtxAGjeOXvNvxCQC5UP AEwGHweVlmlkO86g+g882BMl6r1opoIUo2sctKI+nMz4ODY867kBwIWGzjq40zP+CEEM QH6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="t9/LzMl2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="t9/LzMl2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-68189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n22-20020ac86756000000b0042dc7d56c01si3130755qtp.60.2024.02.15.23.51.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:51:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="t9/LzMl2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="t9/LzMl2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-68189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 667801C21EAD for ; Fri, 16 Feb 2024 07:51:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89CC51759D; Fri, 16 Feb 2024 07:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="t9/LzMl2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eExjU4mE"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="t9/LzMl2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eExjU4mE" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B6E68833 for ; Fri, 16 Feb 2024 07:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708069884; cv=none; b=ieyRzWQPpv5sZtr+bIvgBZNvtCHyUim+KC3H80pIbThKSrolYUooJqhDJTAfrZRbjFPkJrVo4x8SZjPHtl9UiT3YErMVjAytp62xlWA/GCkqmK8hGmIr4B3Z7vKvYP621RNGOeOTVNprPRrwYRM5kRWjieXlTyHwfiaSYb/G524= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708069884; c=relaxed/simple; bh=8bF7goS6MKQSsc1bLSN9LL2IR7vzhurIY/xLn8K4R6Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vEZfWumK1bgF4urtiIaD7qEkWFnWJn9C4sz1x47i6SlWde8Ju0ewWLa0E1WbVpufvm44ruozeSrsvAmBP+uokpQXhIxEMxKJiFp50P5hnmQ7H+Ep1ssAK4s2dCHzo8kUg08sP9R1ORs3RfGdJOO8h9OCtCuSKiOyp04TNybp1JE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=t9/LzMl2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eExjU4mE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=t9/LzMl2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eExjU4mE; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1CE9A21EF8; Fri, 16 Feb 2024 07:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708069881; 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=T3kSRMNvYqoD1Oew8jvkJgmFhy+2180XepdgpQuG9JA=; b=t9/LzMl2CRtI/GwuTpbOZMw4MT6i2J2aZ5B+3sChAPt+vTv+R3FtsRTLN2EYo09OVMTzze uIBGQ0HX65xwCYkD1JIjYGi8O1Miu2w68ujiuyVjMwIAZo3Kub9PiwuXSgkFguaKEZlAic JV6KyavyjYKa6bBzR5dAuhEHbGY7R64= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708069881; 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=T3kSRMNvYqoD1Oew8jvkJgmFhy+2180XepdgpQuG9JA=; b=eExjU4mE/PaJBmGZBUFFnwsmW/luxQEN4/qZ+UkFMcowV1HFpIpx+pUlRTwK6fioN6Z9mU sXTSABZrHG9yewDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708069881; 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=T3kSRMNvYqoD1Oew8jvkJgmFhy+2180XepdgpQuG9JA=; b=t9/LzMl2CRtI/GwuTpbOZMw4MT6i2J2aZ5B+3sChAPt+vTv+R3FtsRTLN2EYo09OVMTzze uIBGQ0HX65xwCYkD1JIjYGi8O1Miu2w68ujiuyVjMwIAZo3Kub9PiwuXSgkFguaKEZlAic JV6KyavyjYKa6bBzR5dAuhEHbGY7R64= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708069881; 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=T3kSRMNvYqoD1Oew8jvkJgmFhy+2180XepdgpQuG9JA=; b=eExjU4mE/PaJBmGZBUFFnwsmW/luxQEN4/qZ+UkFMcowV1HFpIpx+pUlRTwK6fioN6Z9mU sXTSABZrHG9yewDA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 46E7B13421; Fri, 16 Feb 2024 07:51:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id pN+RDvgTz2WmaQAAn2gu4w (envelope-from ); Fri, 16 Feb 2024 07:51:20 +0000 Date: Fri, 16 Feb 2024 08:52:30 +0100 From: Oscar Salvador To: Byungchul Park Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, akpm@linux-foundation.org Subject: Re: [PATCH] sched/numa, mm: do not promote folios to nodes not set N_MEMORY Message-ID: References: <20240214035355.18335-1-byungchul@sk.com> <20240216070754.GB32626@system.software.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240216070754.GB32626@system.software.com> X-Spam-Level: Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="t9/LzMl2"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=eExjU4mE X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-6.96 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_HI(-3.50)[suse.de:dkim]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWELVE(0.00)[15]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.95)[94.76%] X-Spam-Score: -6.96 X-Rspamd-Queue-Id: 1CE9A21EF8 X-Spam-Flag: NO On Fri, Feb 16, 2024 at 04:07:54PM +0900, Byungchul Park wrote: > For normal numa nodes, node_data[] is initialized at alloc_node_data(), > but it's not for memoryless node. However, the node *gets onlined* at > init_cpu_to_node(). > > Let's look at back free_area_init(). free_area_init_node() will be called > with node_data[] not set yet, because it's already *onlined*. So > ->zone_pgdat cannot be initialized properly in the path you mentioned. I am might be missing something., so bear with me. free_area_init() gets called before init_cpu_to_node() does. free_area_init_node() gets called on every possible node. free_area_init_node then() does pg_data_t *pgdat = NODE_DATA(nid);, and then we call free_area_init_core(). free_area_init_core() does free_area_init_core() does zone_init_internals() which ends up doing zone->zone_pgdat = NODE_DATA(nid); If node_data[] was not set at all, we would already blow up when doing the first for_each_node() pgdat = NODE_DATA(nid); free_area_init_node(nid); back in free_area_init(). -- Oscar Salvador SUSE Labs