[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202c4509-27dd-4b31-8959-5679472e0670@linux.ibm.com>
Date: Thu, 22 May 2025 17:16:28 +0530
From: Donet Tom <donettom@...ux.ibm.com>
To: Mike Rapoport <rppt@...nel.org>, Oscar Salvador <osalvador@...e.de>
Cc: David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.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 5/22/25 4:01 PM, Mike Rapoport wrote:
> On Thu, May 22, 2025 at 12:06:06PM +0200, Oscar Salvador wrote:
>> 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.
>
> I think you are right and a sensible follow up cleanup can be renaming
> __register_one_node() to register_one_node() :)
Thank you, Oscar and Mike.
Yes, I agree—we can remove register_one_node() entirely.
I will go ahead and remove register_one_node(), rename __register_one_node() to
register_one_node(), and send the next revision.
Thanks
DOnet
>
>> --
>> Oscar Salvador
>> SUSE Labs
>>
Powered by blists - more mailing lists