From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 20219344DB9 for ; Fri, 3 Jul 2026 04:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783052085; cv=none; b=ty51brK7EFtlWkZhrBfkZiLKLG2tf7s979AVL/iRrWY0an7jrWJCHi2jd89ONn7VWgIICeZNHxwlChu5KxHeDKP/zj8cBDUtO54EOUUWugc52GBOOelYxPx24zfynT82muUxxnAVeqwfk6UHJgdwk78wgiQZa0BFMR8Ytz7hyNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783052085; c=relaxed/simple; bh=SS7fkdrQHbOZavcMB7EkWvfwUR58OeBP9cMMRcDhmD4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g1VNhe8uUjAW6zEsE/+dbNiQr2Kgkr5y8xqb8WJ6INvsOOh7j887FFnl0eZ4nCWtyijhIey8ckzsQk+T8Gkdbc1ENSmVGs08b5bIZzv3H1pP5Qap+4z6dftUiGP0M4UjGkMPvVBGEoE6ckG4Of24wtghwXToSVKgbeJJWfjcnTo= 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=grdXVQx7; arc=none smtp.client-ip=209.85.210.172 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="grdXVQx7" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-8423f236418so73973b3a.1 for ; Thu, 02 Jul 2026 21:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783052071; x=1783656871; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EDa87XVL//1Q+gQWaZZS4t0Al5v4r1ZYls44rvYc7DM=; b=grdXVQx76BOjW4CIxw5zn0PZHUaQpMO5EIqEY8mxBayiDwAsgs/vuAT2CrVsWl/xNS /kqH+7WkQX3NXAkohnOHOsAOvc+2W2butlwf6t1Rd0s+hPZRe2GexVnPTw6Hs8F+mxgJ TJYaDUIzS5imovRKxYuhR5MthEVQhCa4O4kjdkw+XQ5bGF7sqx4IUuXHrQrFztfJj1UE fblgESWt1R/bqbNzSiWtYMX0E94AFSOw/cSYWPdspWRfispioR2DFOr105FGU0AVbWaO RS5c0J9p8eEInUOy6xySnrUyy6kFrO06yz1c3NaBSYZM9f1e9jqaT8ndT8FEC5AKNbLw tlGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783052071; x=1783656871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=EDa87XVL//1Q+gQWaZZS4t0Al5v4r1ZYls44rvYc7DM=; b=UGUQ2oBD0Oe4iJNVyOqx9tcKvSk4p1ZM37cm+mHrg3oIlu+D2+T4ZaG5YtZiF0q1Fl 34DaiyR3PU5qDvQ9PdKaSifkwYcz99c6cFxteXiVwlK4zUY9mr8r1sKjaUXvJAO30lRm jYQMyQ550VTF11smmTiLLIuK/gRxELRJL7jojSw62vvbfHfGkZExDimA1w1Tx4vAkuz5 bglugDN6uJx+pMZpyOLcgAj6LwrqXBCuNPYUtRgOquxB0tIqYI0FtxGvOdx3rF0BTTvF 11GzYPWdWDm0Txf2UQRwHvXk5YkQBQlHhYlF6PMGNcMiYR1HgKPfVOX87xwHlrhIhiSb lwvw== X-Forwarded-Encrypted: i=1; AHgh+RpFar3J+sKQyNHdyzZmq1vtvdrrC3wpOAVZlNiFr3hchPV7Um5QkgoGuSBy6gDRekv76PClqQzd+wuoL/8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2rkBdHOi0jdw1kRey1vOIYSGMAfVQBkbFk/Qx4JY9ts/LK/78 aN2UU2Op7QB7+F/R67KPLANXtNswQgaoJ1SdbUqJ9FqM07uFb0oNXBA6 X-Gm-Gg: AfdE7cm4zH2RGOPTKjx5Q6cmoLx03J8nZtsJmvfnrgOVRLwzTUaCbak1m3EYrTfixkT UKT/v53eZgF+9x2EwFRe5d/WQNPo3IVNBgRUW51ik0wLOXLktY8VvEwzdZLW05CXAlNSrmKTtzE I7k5HMdQ3otxqgElsJt0LEKgo+SlnwZTVtmLXgmzQRRxWTSdaUsyutOWnUmF8aujIUkVvdHN4ap B3yahQV22b2aGli7GkHsJpyMmwCIkFyBGs6Og7vIkJS0P6Iwud8LFZrf3pKGfsEdZfU9vgSI4vw 2VnXXcypO2laCa+2TJwMckhjXqchwGvQkhI5eJUl+wmZBJWqw0ZI/+8rzKqzAEb8scLl2GD/gQo HN8Y5eVPrPWI2DF5JgJyv8VPA9wyuPfOOOj/oVeF9ySrTIPHtLWlqv5ePAjug+v3kO0kxImdhGH jjNh1uXUE= X-Received: by 2002:a05:6a00:2d26:b0:845:c6fc:2821 with SMTP id d2e1a72fcca58-847c506656dmr7890365b3a.22.1783052071447; Thu, 02 Jul 2026 21:14:31 -0700 (PDT) Received: from ubuntu.. ([110.9.142.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847cb94bd7esm2207768b3a.38.2026.07.02.21.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 21:14:31 -0700 (PDT) From: Sang-Heon Jeon To: rppt@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, Sang-Heon Jeon , Andy Lutomirski , Borislav Petkov , Danilo Krummrich , Dave Hansen , Greg Kroah-Hartman , Huacai Chen , Ingo Molnar , linux-kernel@vger.kernel.org, Peter Zijlstra , "Rafael J. Wysocki" , Rob Herring , Saravana Kannan , Thomas Gleixner Subject: [PATCH v2 7/9] mm: numa_memblks: remove redundant numa_nodemask_from_meminfo() Date: Fri, 3 Jul 2026 13:13:27 +0900 Message-ID: <20260703041329.2797584-8-ekffu200098@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260703041329.2797584-1-ekffu200098@gmail.com> References: <20260703041329.2797584-1-ekffu200098@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit numa_add_memblk() now sets each added node in numa_nodes_parsed, so numa_nodes_parsed already contains every node that owns memory. The nodes numa_nodemask_from_meminfo() adds from numa_meminfo are already set, so the calls in numa_alloc_distance() and numa_register_meminfo() are redundant. So remove both call sites and the unused function itself. No functional change. Signed-off-by: Sang-Heon Jeon --- mm/numa_memblks.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/mm/numa_memblks.c b/mm/numa_memblks.c index 9815192549c3..48428060e93f 100644 --- a/mm/numa_memblks.c +++ b/mm/numa_memblks.c @@ -17,20 +17,6 @@ nodemask_t numa_nodes_parsed __initdata; static struct numa_meminfo numa_meminfo __initdata_or_meminfo; static struct numa_meminfo numa_reserved_meminfo __initdata_or_meminfo; -/* - * Set nodes, which have memory in @mi, in *@nodemask. - */ -static void __init numa_nodemask_from_meminfo(nodemask_t *nodemask, - const struct numa_meminfo *mi) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(mi->blk); i++) - if (mi->blk[i].start != mi->blk[i].end && - mi->blk[i].nid != NUMA_NO_NODE) - node_set(mi->blk[i].nid, *nodemask); -} - /** * numa_reset_distance - Reset NUMA distance table * @@ -56,7 +42,6 @@ static int __init numa_alloc_distance(void) /* size the new table and allocate it */ nodes_parsed = numa_nodes_parsed; - numa_nodemask_from_meminfo(&nodes_parsed, &numa_meminfo); for_each_node_mask(i, nodes_parsed) cnt = i; @@ -415,7 +400,6 @@ static int __init numa_register_meminfo(struct numa_meminfo *mi) /* Account for nodes with cpus and no memory */ node_possible_map = numa_nodes_parsed; - numa_nodemask_from_meminfo(&node_possible_map, mi); if (WARN_ON(nodes_empty(node_possible_map))) return -EINVAL; -- 2.43.0