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 9AC94313279 for ; Mon, 24 Nov 2025 16:58:18 +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=1764003498; cv=none; b=FIAfNyl2h6yfzFWe+EYKVKi5Yub3xFXj/ZL04eglMr6FcVJ4BJqMkH8v1hpSg7J6yXu4hGHepBB7iPFI9cf1gh38R3pIwH8AxRNlLaGaRyPDM+zNkyEOjYrDeEvUND31xfSinP1vHLqwpSmyI8ZE3DtEW/A4/2WX1SHonNQGcuE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764003498; c=relaxed/simple; bh=tMBhcqn9bceBvM5ZEFAmI77gEkyO2ji65s3mR9vK9Qw=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=ETp1/DOvy4c98zY1loHp8GiYXJwJ9BykqthkLASKNPWnqgbBL+C86+mgiTaT3Dy9XKjLrIZ5A/i9SbhI5BtjYOXrnjs4nTpw2ZQ+SwL8HKCclIniVU+nIjstBmQfahgsyUROcUw8AqRnhjvCrdu/R9epAlXgdkhYMTjdUehuL2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=UT5MuBnW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="UT5MuBnW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCCCCC4CEF1; Mon, 24 Nov 2025 16:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1764003498; bh=tMBhcqn9bceBvM5ZEFAmI77gEkyO2ji65s3mR9vK9Qw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UT5MuBnWn4wHxP/3GzpYbhHve1Mku91hqGOvYCM/bLeSkyKsSissdar2zDddiQYf5 Bw+BNJndd8KL8wqlWe7s5jcn6A55PnkufCc8q5MyTMAke4rKa3N1sWmijzveDl0MTk Nal+wtbR45nPi+pGtzlXNYng+qtvddibSvjeDycU= Date: Mon, 24 Nov 2025 08:58:16 -0800 From: Andrew Morton To: Ilias Stamatis Cc: , , , , , , , Subject: Re: [PATCH] Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()" Message-Id: <20251124085816.07dbf5a4ec6235b2943840a0@linux-foundation.org> In-Reply-To: <20251124165349.3377826-1-ilstam@amazon.com> References: <20251124165349.3377826-1-ilstam@amazon.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 24 Nov 2025 16:53:49 +0000 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. > > As the original commit message of the optimization explains there is no > point considering the children of a subtree in find_next_iomem_res() if > the top level range does not match. Reinstating the optimization results > in significant performance improvements in systems with very large iomem > maps when mmaping /dev/mem. It would be great if we could quantify "significant performance improvements"?