From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 AF66F3749F6 for ; Thu, 2 Jul 2026 06:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782974116; cv=none; b=ALdEyGU0mImOzoUAka6D0BH5LWGjr4Dr9QsL1a72G38tvjKUeggik16x21LEVJnAMhALYT32vTJRIByfqtLGT+qywlh8LO/JBN58kT8W7oxX9juzNxfyHivMIAr7FkdFYPfm8/W9IlYaUmHy/QRQJ0dT7RjcKXtnyrcGRSXhYxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782974116; c=relaxed/simple; bh=Yy80Po8Ok/RoET37jhSivoCnVB+kMfXmTVMP1KhSDdc=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tlK2SW7PndWUkaJbqkfLZPfLMf+/613qceGdwS1uR3CCjkyZhKhtta0jMFSs9bgb/SK9B+dKoB7S6sHcbxT2QNlC65OBrM0+KDBle5RN/76sWLFHWnnk+PzBw8OZtwr8TX6ynF7oCAHgLQ3pgxtQiFKxpHFugSQ8Jh7hpsxdh+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZV/wejio; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZV/wejio" Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-8143daf89c7so8745537b3.1 for ; Wed, 01 Jul 2026 23:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782974113; x=1783578913; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:date :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Noief9ZbgMWwjMEa1Uv1EUAk6Y9VcmmMv+j7+9dAjkc=; b=ZV/wejioSt7vgXWRZyco+lqFrvP05AykVxcN3MvuvsxdqxOB3kWxM9h+EFx4tS77y6 ECr3yXY2ujlrsvo28bua/vmu+SqnY9+6hKcBIkM8Nolm0wm1fV37VwsW+F0Q916awGok viBfRnP3ikwnkktB3QS/1+zjmBXPnUMhfMFjvwoHP82cywkDD9NTSJztXkYZSquUmlOs 623u6whoh2hsLqUlRb3X+i4/PldrciyQm6vw6V+LEIeImfAwwwpQhFMLXZchdFXCTs/D oU45bQnk3jU1nrYmlWvNOaIYBz4YllqLt2GCM0EgFAkvbQGT4f09dKD/yM1/vYvRwTeU anyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782974113; x=1783578913; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:date :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Noief9ZbgMWwjMEa1Uv1EUAk6Y9VcmmMv+j7+9dAjkc=; b=hgX5dMJKsBBtQxc3gKweStF1HGKh8A9oK0mrHJ6PydgXxp57fNE+7bSdICYgqT07KJ U8VPVnvM6ty+op5i9b/EO3/0yYjGMUq/xNBjqUUtlapFaOlfbYK2Kll21HhdS68Q1hX9 bvoKF8L3UE3qYxr2YDNhMxu/sNyjt1bxF4nG2h+zWzFs1+kz0Y3/MLwXB+npOa8N3xXO eEuSdzUOeuMaZa3RgrQ0tvhXx/fTWIi0OJPeye1AfjzT3i2btDUeAEIdgl6iCT3QeIbA UG7eF8K9Oa70pcarodv8Ms6fUpz8tVWd/K2Bb0tBdJyW9+7EyP8PW5VEHEVFCHUr5fZX 6QOA== X-Forwarded-Encrypted: i=1; AHgh+RpQryQcMoz6DZVARSd2x+ky3snOMMTnJhSBeR3CNrwcE6bI6iBqc503p6/NuGEn+VAeGHOgKuLhPHFA0+U=@vger.kernel.org X-Gm-Message-State: AOJu0YwUsHPaRjGnrJnkdoSoLkXSK2BDbPrCl58uJhd5htRiqO1dKsPG L+wWHCMdT9CqRktjOEz/jy5yJFTrQfrqxotnAoNMxsVnrF28YnKoLSio X-Gm-Gg: AfdE7cmuYGXlhbo0qbExe1/OX6Bl3e0Fl9nD1a6ahDSGR09yTMCHe1Adi7Cij8beWID dv6q3Bn3zjAZxJ92+Pj4EJcuxbXRPmQ6gniXsviE17pjbk5UzRLspYislOjUmVMXniCfSZicNid oX9XnrbBolvcp0g1ByxAAIslKFDdtHJlbBHoz+bwCE/Gh8Y/MeWO7ohjqZRHPXGedpJZsdU40EO LFy3gubXnhmwL7QJa0f7uXSsq6gSYhE/rF8S718s1EgaUp4WJYqbG6cg2K7H4m92Vqdho9uicLN 8f8ri1ymymmGubImxdShI5Fgq05rTwVc5cqLFeNLDxJ2K9KCuY+5617blwF0Y+9mNaSfZczUjjG L3ua0q7ldrvQrWDSfXsBgSJSwF+H7eCbMJmSTJMEpXBRNANTffjI87Wge8MbdY6sSTBuLmc8p6A YwfwgdHelLr2PQgbZTt4s= X-Received: by 2002:a05:690c:6905:b0:80a:9f2a:fca2 with SMTP id 00721157ae682-8138a6a3211mr45338417b3.54.1782974113494; Wed, 01 Jul 2026 23:35:13 -0700 (PDT) Received: from localhost ([216.228.127.131]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8144b834079sm8875167b3.40.2026.07.01.23.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2026 23:35:13 -0700 (PDT) From: Yury Norov X-Google-Original-From: Yury Norov Date: Thu, 2 Jul 2026 02:35:10 -0400 To: Sang-Heon Jeon Cc: Yury Norov , akpm@linux-foundation.org, Madhavan Srinivasan , Michael Ellerman , linux-mm@kvack.org, Andreas Larsson , "Christophe Leroy (CS GROUP)" , "David S. Miller" , John Paul Adrian Glaubitz , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin , Rich Felker , Vlastimil Babka , Yoshinori Sato Subject: Re: [PATCH 3/4] powerpc/numa: set node_possible_map from node_online_map Message-ID: References: <20260701171851.2447626-1-ekffu200098@gmail.com> <20260701171851.2447626-4-ekffu200098@gmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jul 02, 2026 at 12:57:46PM +0900, Sang-Heon Jeon wrote: > Hi Yury, > > On Thu, Jul 2, 2026 at 5:55 AM Yury Norov wrote: > > > > On Thu, Jul 02, 2026 at 02:18:50AM +0900, Sang-Heon Jeon wrote: > > > mem_topology_setup() intersects node_possible_map with node_online_map. > > > Nothing sets node_possible_map before this, so it is NODE_MASK_ALL and > > > the result is just node_online_map. > > > > > > In preparation for changing node_possible_map's initial value, > > > mem_topology_setup() no longer depends on it. > > > > > > No functional change. > > > > > > Signed-off-by: Sang-Heon Jeon > > > --- > > > arch/powerpc/mm/numa.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > > > index f4cf3ae036de..2fdecae90a01 100644 > > > --- a/arch/powerpc/mm/numa.c > > > +++ b/arch/powerpc/mm/numa.c > > > @@ -1179,7 +1179,7 @@ void __init mem_topology_setup(void) > > > * that we expect to make use of for this platform's affinity > > > * calculations. > > > */ > > > - nodes_and(node_possible_map, node_possible_map, node_online_map); > > > + node_possible_map = node_online_map; > > > > > > find_possible_nodes(); > > > > And in find_possible_nodes(): > > > > for (i = 0; i < max_nodes; i++) { > > if (!node_possible(i)) > > node_set(i, node_possible_map); > > } > > > > So, assuming the code reaches to that point, you unconditionally > > online all the offlined nodes. > > This loop only sets bits in node_possible_map, not in node_online_map, > so I can't find how it onlines the offlined nodes unexpectedly. Please > correct me if I'm wrong or missing something. > > Or are you talking about the case where max_nodes exceeds > MAX_NUMNODES, which was also noticed by sashiko? I think it is a > pre-existing issue, and this patch does not affect it. Oops, sorry, It's my bad. They are nodemask_t, not pointers, so in "node_possible_map = node_online_map" you copy by value. Thanks, Yury