Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp278062lqp; Wed, 12 Jun 2024 00:53:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2DxHmV6ifR0doqXStq284ELQ1zzWwsTS8WcLWP81BuuKv1zBol6bisMTFdZWvw0Pb+ni8N4M4KE/XhCo6+BhP8y1vKJK/cK/TJWoKBQ== X-Google-Smtp-Source: AGHT+IFcg0HSj9Gw1ALZcST57CDlYTIeae9Iv0p5RW4unnP9DENJe/JnmSxAEhpnb+Y2eZcB2m2f X-Received: by 2002:a17:907:38c:b0:a6f:1025:8dd4 with SMTP id a640c23a62f3a-a6f47ff7921mr61076966b.52.1718178802903; Wed, 12 Jun 2024 00:53:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718178802; cv=pass; d=google.com; s=arc-20160816; b=aaA72FtFnFuniLefXOYdFREMh8rdBVIf2QffklQl/FrBm9dE6xAjdXgnjWrMJk9T2x iXS1LBeARmjj1m4z+mOTMHwDHBddJI7Cma7ti82JzFhmYoZ6uy6/ztdUNM2YG4BTRk9p 96NiL/qZQO2uQ3i/uMoOKC09phL5shLEacJRKkSF4g137eoNKiU7r1TfAqfQgQTn2RW5 q7asUMZhfbwx8BBD5ofUOYiF2wlGi6WYSFCVEHyTEzvulwF6+yRV5+oqfkzxhZetVMQw Z2EVmCAFoL/1OZvmNhJfCjhBM8YRuKyO8MVfFoIVOl1VVC3Ufvp/S2+FtsR4SNBuTeUh gmBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=gLUzs3PLr84neafMCadm37mIM7NaviGbRJW27UUFcas=; fh=H3bURo9s3S3B16OyCb5AT0didE+F4GsRi/A6SbuqFI8=; b=mvRZlr4LKXrYhdJ6QQ7gi/W5hYXqWh5RnQYA/dkBt1XwoWwA0Etxo2k2KVdONxAp6t /u9zJ3M6ae/Z2UL92ZzcJw3HvMRJ6kvAFko33s6ci4fp3JEo1JKdC530Rv4myBX7Dzmq 12fTqb8pYc9kbs9FVCI2SnZt+vtWM+cxZga8JAavwD9AwbjRkU26zjsWsXfMNJA7uMmx mcKqEURPcgc/KkDQvYla7vQDpSOO3cwANZHVCkiN2s7Yju6X3kJk7B5uvlJQ//XKv7nV 5gB7FuFZmcKqe33inZpSRep0M8pwcZOCKzMAgUGeW/uUCWkOIf4MPrgeRonjrBTu0rQe OzrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-211104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6eab2f12b5si480571866b.26.2024.06.12.00.53.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 00:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-211104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9CF351F220FC for ; Wed, 12 Jun 2024 07:53:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC1E316C69B; Wed, 12 Jun 2024 07:53:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D8222772A; Wed, 12 Jun 2024 07:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178794; cv=none; b=RvMQLfHaONF6U2Bt8cnyhtpoVmABkyuTmZ4Pl0QrCBqcK3klye2IoQKi249Pm2wlI9M37ppL1yk7y5usZU3J97lzdnvm5I2B5UCetGHrEkzeBMuCsxj3iNhCLLmjqqL4Wr04gd3/JwBp9P7Yr/sILSR6XAG+P6zLRnCuZGTR2bU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178794; c=relaxed/simple; bh=yZsBP9m4WWs5zCRUxsl4WsBOoGGwuUfEVhbz0xFqIRs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=r/GO0OBI4O+83rLIsd5TjkbwSqUuhliUs0omVpTXYwBCRCZ3sJdbb05LHhp7HxwpAr4f1dMnM8TcajsMIWaovbugsmEEulrvDQII/YLY12xgubm46PmnqRIk5ElALQ2TTc8mG0CwfIlh6KTqFqXyE2a6Yfob49C4ot0z8sKF2m4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7EC2F1595; Wed, 12 Jun 2024 00:53:35 -0700 (PDT) Received: from [10.57.72.106] (unknown [10.57.72.106]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C655F3F64C; Wed, 12 Jun 2024 00:53:08 -0700 (PDT) Message-ID: Date: Wed, 12 Jun 2024 08:53:17 +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 v6 2/2] cpuidle: teo: Introduce util-awareness To: Qais Yousef Cc: Kajetan Puchalski , rafael@kernel.org, daniel.lezcano@linaro.org, Dietmar.Eggemann@arm.com, dsmythies@telus.net, yu.chen.surf@gmail.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ulf Hansson , Vincent Guittot , Todd Kjos , "wvw@google.com" References: <20230105145159.1089531-1-kajetan.puchalski@arm.com> <20230105145159.1089531-3-kajetan.puchalski@arm.com> <20230711175814.zfavcn7xn3ia5va4@airbuntu> <20230718132432.w5xoxbqm54jmu6n5@airbuntu> <20230917010516.54dgcmms44wyfrvx@airbuntu> <20240529101950.bjpmmdqfhjg3aol6@airbuntu> Content-Language: en-US From: Lukasz Luba In-Reply-To: <20240529101950.bjpmmdqfhjg3aol6@airbuntu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Qais, +Todd and Wei on CC On 5/29/24 11:19, Qais Yousef wrote: > On 05/28/24 11:29, Vincent Guittot wrote: >> Hi All, >> >> I'm quite late on this thread but this patchset creates a major >> regression for psci cpuidle driver when using the OSI mode (OS >> initiated mode). In such a case, cpuidle driver takes care only of >> CPUs power state and the deeper C-states ,which includes cluster and >> other power domains, are handled with power domain framework. In such >> configuration ,cpuidle has only 2 c-states : WFI and cpu off states >> and others states that include the clusters, are managed by genpd and >> its governor. >> >> This patch selects cpuidle c-state N-1 as soon as the utilization is >> above CPU capacity / 64 which means at most a level of 16 on the big >> core but can be as low as 4 on little cores. These levels are very low >> and the main result is that as soon as there is very little activity >> on a CPU, cpuidle always selects WFI states whatever the estimated >> sleep duration and which prevents any deeper states. Another effect is >> that it also keeps the tick firing every 1ms in my case. > > Unfortunately I think we need to revert this. We've been seeing the power > regressions for a long while now and it doesn't seem we'll see an improvement > soon based on last discussion. Could you be more precised when you say 'we'? It's not Vincent, because he said he cannot measure power on his end. Do you mean Google ACK? Or Google Pixel Team? You send emails from your private account and people are confused when you say 'we'. > >> >> IMO, we should at least increase the utilization level > > This won't help. We tried different values, unfortunately the logic is flawed. > Utilization value on its own says nothing about the idleness of the system. This is not true. When you up-migrate a task to big CPU, then CPU idle gov can instantly benefit from utilization information and won't make mistake based on old local history and won't use deep idle state. So migrating the utilization from one CPU to another CPU says a lot about the idleness to that destination CPU. When Christian removed the util he got -4.5% lower score in GB5, so this util has impact [1]. > I think best to revert and rethink the logic. Which is something we're pursuing > and we'll share outcome when we have something to share. As it stands, this > doesn't help. And we should really strive to avoid magic thresholds and values. > They don't scale. Please share the power numbers. It's not helping when you just say some power regression w/o numbers, but with assumption that you are working for big company. Regards, Lukasz [1] https://lore.kernel.org/lkml/20240611112413.1241352-1-christian.loehle@arm.com/