[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65547a74-ceeb-4aa2-afc1-ebbbd3b8d918@linux.ibm.com>
Date: Fri, 16 May 2025 16:30:46 +0530
From: Donet Tom <donettom@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>, Mike Rapoport <rppt@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oscar Salvador <osalvador@...e.de>, Zi Yan <ziy@...dia.com>,
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 1/4] driver/base: Optimize memory block registration to
reduce boot time
On 5/16/25 3:42 PM, David Hildenbrand wrote:
>>> We'd have to be smart about memory blocks that fall into multiple
>>> regions,
>>> but it should be a corner case and doable.
>>
>> This is a corner case that should be handled regardless of the loop
>> order.
>> And I don't think it's handled today at all.
>>
>> If we have a block that crosses node boundaries, current
>> implementation of
>> register_mem_block_under_node_early() will register it under the first
>> node.
>
> At least upstream behavior should be that it would be linked under all
> nodes. At least that's what I remember :)
>
>>> OTOH, we usually don't expect having a lot of regions, so iterating
>>> over
>>> them is probably not a big bottleneck? Anyhow, just wanted to raise it.
>>
>> There would be at least a region per node and having
>>
>> for_each_online_node()
>> for_each_mem_region()
>>
>> makes the loop O(n²) for no good reason.
>
> Yes, that's why I mentioned it. If we have many nodes it might
> definitely be relevant.
Thanks David and Mike
I will implement this and send the next version.
Powered by blists - more mailing lists