All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Oscar Salvador <osalvador@suse.de>
Cc: Donet Tom <donettom@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Zi Yan <ziy@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Yury Norov <yury.norov@gmail.com>,
	Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH v5 3/4] drivers/base/node: Remove register_memory_blocks_under_node() function call from register_one_node
Date: Thu, 22 May 2025 13:31:27 +0300	[thread overview]
Message-ID: <aC78_1-1CtAl0qlG@kernel.org> (raw)
In-Reply-To: <aC73Dp90lDz1PN5T@localhost.localdomain>

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() :)
 
> -- 
> Oscar Salvador
> SUSE Labs
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2025-05-22 10:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22  9:17 [PATCH v5 1/4] drivers/base/node: Optimize memory block registration to reduce boot time Donet Tom
2025-05-22  9:17 ` [PATCH v5 2/4] drivers/base/node: remove register_mem_block_under_node_early() Donet Tom
2025-05-22  9:17 ` [PATCH v5 3/4] drivers/base/node: Remove register_memory_blocks_under_node() function call from register_one_node Donet Tom
2025-05-22 10:06   ` Oscar Salvador
2025-05-22 10:31     ` Mike Rapoport [this message]
2025-05-22 11:46       ` Donet Tom
2025-05-22 12:09   ` David Hildenbrand
2025-05-22  9:17 ` [PATCH v5 4/4] drivers/base/node : Rename register_memory_blocks_under_node() and remove context argument Donet Tom
2025-05-22 10:36 ` [PATCH v5 1/4] drivers/base/node: Optimize memory block registration to reduce boot time Mike Rapoport
2025-05-22 11:59   ` Donet Tom
2025-05-22 12:09 ` David Hildenbrand
2025-05-22 12:29   ` Donet Tom
2025-05-23  8:46 ` Oscar Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aC78_1-1CtAl0qlG@kernel.org \
    --to=rppt@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=dakr@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=david@redhat.com \
    --cc=donettom@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=rafael@kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=yury.norov@gmail.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.