From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B352230BD5 for ; Tue, 25 Nov 2025 08:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764058149; cv=none; b=tln2FyMBKdhmXv8Ou5fLxm/l7JujWUlfVM2/93tsjcakmeK9wcuO2u9Php2mKetx8mAR4HGujW1qV/wlgO14W/VawQIjcnIPvkFdnT+mUKtD9yUQBaNVGhps6MUjQN7NZSZOIAbH434XvkvpIBPJkB2S3l//WIhicH/cF6t9O40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764058149; c=relaxed/simple; bh=XqRq7kplVxhYGNzr105/v144FYOHWjKj2LupjtZhQuk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ekxslzAqYRfHPwmYngk0GYC8RaLzQw8pcsixA29tnqZ3eCYTrczJixE4m+f47/Wm5H42tZkj0Nx5WZ7KpQCCpxP6M8WcSilGhPlX+Cyj6W6r1LgJcWuyK1/H2p6fyxHc1LUojwMsbLAvJ/CW/U9UsVdiHUfsoeGuDOQkgCHai2o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mLshyslP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mLshyslP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 675FFC4CEF1; Tue, 25 Nov 2025 08:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764058149; bh=XqRq7kplVxhYGNzr105/v144FYOHWjKj2LupjtZhQuk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mLshyslPa3UjOa8eCf4PBZlVgAJ4YIqYI/eMgpfd4Ohv8/Y83HKae4OmSnPeYp6wo cR0lDouYxSW08C1z262NdTq01IkB+c+IEsJ+4YM4gVDy1SNmUxu4VkVHG6G67a97pn 2xc0nCP13CcSIWSCMd1u6r/CpbTIJ124t307FuwcaAg5D2VACYWiguJWtbEKgnry2m VCDUq/QVII7t/BkjlK8UNxZ7MWX/Dgqi/7mXvN6VSiL5ch64RtOu5CbQkkIdxR7lTJ dpCVyGthO8GJMt1n10pKg0PCbgQtRbLDrQCbRTyqU91egIXnBC+F3MfwSOQ873PT4W EgMtD7hWasMWg== Message-ID: <9fdc1d1f-ce00-47ff-bdf5-66e8a511be25@kernel.org> Date: Tue, 25 Nov 2025 09:09:02 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()" To: Ilias Stamatis , akpm@linux-foundation.org, linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, nadav.amit@gmail.com, huang.ying.caritas@gmail.com, andriy.shevchenko@linux.intel.com, bhe@redhat.com, nh-open-source@amazon.com References: <20251124165349.3377826-1-ilstam@amazon.com> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: <20251124165349.3377826-1-ilstam@amazon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 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