From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 3D847313E0D for ; Mon, 24 Nov 2025 17:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764003939; cv=none; b=cs2X1kgkmgMlQv27giy0KwVsOZVVz+NcfTfXFZAMqrfKs3sTWqxFtIrIvvTmAkC8/E87xD29JNBLzBehE6TiwZ99Uw0bPrISavOXe2+Zbfu4QfKSTKeBn1weocqQmolQNonMsRPfXj4Vzj7jLmh3Y7AoPY3lALCqB3fDxhKX9ZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764003939; c=relaxed/simple; bh=BFRGsh/G57/nCp02zG4DAl7w2UHEdFTFhg0Ep2EJJrI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fjwcB54bLwHAgfJgu9JG3vXuhWT+s7Gx9HEYrQ9HCTOr/VaoMQVLaOopQy9hx3JuMQb8ir/0RWt/uatl7jNi1QR9R+rSNGMOwjdCDhBXBVCpgwA6X+icpDrOyAuJfXjpgzZmjX9SVYFzffkYQgQQbG8+T5Ovt2JP2JF2zbHRGbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kG44m7JH; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kG44m7JH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1764003938; x=1795539938; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BFRGsh/G57/nCp02zG4DAl7w2UHEdFTFhg0Ep2EJJrI=; b=kG44m7JHvSSX5l5PtbRkqcjOLfuwM0h2kZ/kjawbf3A0vtD4a30sGTzo slUqHrBWVoTC7MWeZoxKPrGs//1B5WcJCv1ihBO94qB2ZrSeuGo31+DAo fCHwrJkhwtHrT0u3SQuFloieNG1pZZTlkI78iBAgXz4+whltkA/k3WUb1 p3PBNvJ6knbKKTRvmo2XikLMMKuqw8MxwIitP3IGGmgKcEZHnxDK0SI2Z bhN2U3l6W4xgYgXQy51xXv1Mh4uZ/Zt/ihPCvWrp94Qm0ROVitzGL8Jdf Mq/d5fpAJ01wvH7qXa2k21SVwLjkqfch470epO/BjG6rWKmYwIDw33lOq w==; X-CSE-ConnectionGUID: XjZc/FdJRvaEJgNCz0UnRw== X-CSE-MsgGUID: TijaOZoUTmeiPrkGsroCRA== X-IronPort-AV: E=McAfee;i="6800,10657,11623"; a="69864641" X-IronPort-AV: E=Sophos;i="6.20,223,1758610800"; d="scan'208";a="69864641" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2025 09:05:37 -0800 X-CSE-ConnectionGUID: LNeMYZhaSq6aHIS5tAfYCg== X-CSE-MsgGUID: b4i3KSt9S1mZxtRZe0tx4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,223,1758610800"; d="scan'208";a="196545997" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO localhost) ([10.245.244.5]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2025 09:05:35 -0800 Date: Mon, 24 Nov 2025 19:05:32 +0200 From: Andy Shevchenko To: Andrew Morton Cc: Ilias Stamatis , linux-kernel@vger.kernel.org, linux-mm@kvack.org, david@kernel.org, nadav.amit@gmail.com, huang.ying.caritas@gmail.com, bhe@redhat.com, nh-open-source@amazon.com Subject: Re: [PATCH] Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()" Message-ID: References: <20251124165349.3377826-1-ilstam@amazon.com> <20251124085816.07dbf5a4ec6235b2943840a0@linux-foundation.org> 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-Disposition: inline In-Reply-To: <20251124085816.07dbf5a4ec6235b2943840a0@linux-foundation.org> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Mon, Nov 24, 2025 at 08:58:16AM -0800, Andrew Morton wrote: > 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"? +1. It also would be good to know which exact function(s) is a bottleneck. The mentioned change updated a handful of them. -- With Best Regards, Andy Shevchenko