[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC73Dp90lDz1PN5T@localhost.localdomain>
Date: Thu, 22 May 2025 12:06:06 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Donet Tom <donettom@...ux.ibm.com>
Cc: David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Rapoport <rppt@...nel.org>, Zi Yan <ziy@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ritesh Harjani <ritesh.list@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
"Rafael J . Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Alison Schofield <alison.schofield@...el.com>,
Yury Norov <yury.norov@...il.com>,
Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCH v5 3/4] drivers/base/node: Remove
register_memory_blocks_under_node() function call from register_one_node
On Thu, May 22, 2025 at 04:17:30AM -0500, Donet Tom wrote:
> diff --git a/include/linux/node.h b/include/linux/node.h
> index 5c763253c42c..6cf349c26780 100644
> --- a/include/linux/node.h
> +++ b/include/linux/node.h
> @@ -136,18 +136,8 @@ static inline int register_one_node(int nid)
> {
> int error = 0;
>
> - if (node_online(nid)) {
> - struct pglist_data *pgdat = NODE_DATA(nid);
> - unsigned long start_pfn = pgdat->node_start_pfn;
> - unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
> -
> + if (node_online(nid))
> error = __register_one_node(nid);
Heh, remembering this code always brings me joy.
After this patch, register_one_node() is only called from try_online_node(), right?
Which, before calling in, explicitly sets the node online, so... we can get rid of
the node_online() check unless I am missing something.
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists