Re: [PATCH] Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"

From: David Hildenbrand (Red Hat)
Date: Tue Nov 25 2025 - 03:09:20 EST


On 11/24/25 17:53, Ilias Stamatis wrote:
Commit 97523a4edb7b ("kernel/resource: remove first_lvl / siblings_only
logic") removed an optimization introduced by commit 756398750e11
("resource: avoid unnecessary lookups in find_next_iomem_res()"). That
was not called out in the message of the first commit explicitly so it's
not entirely clear whether removing the optimization happened
inadvertently or not.

Remembering the history, we have some things where the top might not
fully describe what the lower levels do.

An example is for example found here:

Author: Dan Williams <dan.j.williams@xxxxxxxxx>
Date: Thu Feb 16 00:36:02 2023 -0800

dax/kmem: Fix leak of memory-hotplug resources
While experimenting with CXL region removal the following corruption of
/proc/iomem appeared.
Before:
f010000000-f04fffffff : CXL Window 0
f010000000-f02fffffff : region4
f010000000-f02fffffff : dax4.0
f010000000-f02fffffff : System RAM (kmem)

The CXL Windows will certainly not match System RAM, as one example.

How would your change affect such cases?


--
Cheers

David