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: <719c495f-d514-43f5-814d-e956e149f836@linux.ibm.com>
Date: Thu, 1 May 2025 19:25:43 +0530
From: Donet Tom <donettom@...ux.ibm.com>
To: Oscar Salvador <osalvador@...e.de>
Cc: Mike Rapoport <rppt@...nel.org>, David Hildenbrand <david@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>, rafael@...nel.org,
        Danilo Krummrich <dakr@...nel.org>,
        Ritesh Harjani <ritesh.list@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Alison Schofield <alison.schofield@...el.com>,
        Yury Norov <yury.norov@...il.com>, Dave Jiang <dave.jiang@...el.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] driver/base: Optimize memory block registration to
 reduce boot time


On 4/30/25 1:08 PM, Oscar Salvador wrote:
> On Mon, Apr 28, 2025 at 10:33:46PM +0530, Donet Tom wrote:
>> During node device initialization, `memory blocks` are registered under
>> each NUMA node. The `memory blocks` to be registered are identified using
>> the node’s start and end PFNs, which are obtained from the node's pg_data
>>
> Hi Donet,
>
>> Test Results on My system with 32TB RAM
>> =======================================
>> 1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
>>
>> Without this patch
>> ------------------
>> Startup finished in 1min 16.528s (kernel)
>>
>> With this patch
>> ---------------
>> Startup finished in 17.236s (kernel) - 78% Improvement
> That is pretty impressive.
>
>> +void register_memory_blocks_under_node_early(int nid)
>> +{
>> +	struct memblock_region *r;
>> +	unsigned long start_block_id;
>> +	unsigned long end_block_id;
>> +	struct memory_block *mem;
>> +	unsigned long block_id;
>> +
>> +	for_each_mem_region(r) {
>> +		if (r->nid == nid) {
>> +			start_block_id = phys_to_block_id(r->base);
>> +			end_block_id = phys_to_block_id(r->base + r->size - 1);
>> +
>> +			for (block_id = start_block_id; block_id <= end_block_id; block_id++) {
>> +				mem = find_memory_block_by_id(block_id);
>> +				if (!mem)
>> +					continue;
> I would just mention what David already said here, reduce identation,
> and maybe declare the variables where they are needed. It might be clearer.


Sure, I will change it.

>> +
>> +				do_register_memory_block_under_node(nid, mem, MEMINIT_EARLY);
>> +				put_device(&mem->dev);
> I will comment on the "context" on patch#2.
>
>> +void register_memory_blocks_under_node_early(int nid);
> static void ... ?

Yes, We can make it as static. I will add it in next version.


Thanks
Donet


>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ