lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f23e8df8-5836-4ffb-83ef-d19c7c04947f@redhat.com>
Date: Fri, 16 May 2025 11:18:26 +0200
From: David Hildenbrand <david@...hat.com>
To: Donet Tom <donettom@...ux.ibm.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Mike Rapoport <rppt@...nel.org>,
 Oscar Salvador <osalvador@...e.de>, Zi Yan <ziy@...dia.com>
Cc: Ritesh Harjani <ritesh.list@...il.com>, rafael@...nel.org,
 Danilo Krummrich <dakr@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 linux-kernel@...r.kernel.org, linux-mm@...ck.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 v4 3/4] Remove register_memory_blocks_under_node()
 function call from register_one_node

On 16.05.25 10:19, Donet Tom wrote:
> register_one_node() is now only called via cpu_up() → __try_online_node()
> during CPU hotplug operations to online a node. At this stage, the node has
> not yet had any memory added. As a result, there are no memory blocks to
> walk or register, so calling register_memory_blocks_under_node() is
> unnecessary. Therefore, the call to register_memory_blocks_under_node()
> has been removed from register_one_node().

It might help to throw in some empty lines to make this easier to read.

Patch subject should start with something like

"node:" or "mm:"

> 
> Signed-off-by: Donet Tom <donettom@...ux.ibm.com>
> 
> ---
> v3->v4
> 
> Addressed Mike's comment by dropping the call to
> register_memory_blocks_under_node() from register_one_node()
> 
> v3 - https://lore.kernel.org/all/b49ed289096643ff5b5fbedcf1d1c1be42845a74.1746250339.git.donettom@linux.ibm.com/
> v2 - https://lore.kernel.org/all/fbe1e0c7d91bf3fa9a64ff5d84b53ded1d0d5ac7.1745852397.git.donettom@linux.ibm.com/
> v1 - https://lore.kernel.org/all/50142a29010463f436dc5c4feb540e5de3bb09df.1744175097.git.donettom@linux.ibm.com/
> ---
>   include/linux/node.h | 6 ------
>   1 file changed, 6 deletions(-)
> 
> diff --git a/include/linux/node.h b/include/linux/node.h
> index 806e62638cbe..8b8f96ca5b06 100644
> --- a/include/linux/node.h
> +++ b/include/linux/node.h
> @@ -137,15 +137,9 @@ 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;
> -
>   		error = __register_one_node(nid);
>   		if (error)
>   			return error;
> -		register_memory_blocks_under_node(nid, start_pfn, end_pfn,
> -						  MEMINIT_EARLY);
>   	}

Can be further simplified

if (node_online(nid))
	error = __register_one_node(nid);
return error;

>   
>   	return error;


-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ