Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2558834lqb; Tue, 28 May 2024 04:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsClGrHse6s5vDfPgtCtoRWneMLCgPr2lv2GPhXdcZEe5JRA9RZDjyBrwnh/L+TA5AGwlOMEVW4J7XKa8qAT2f6ym8DTbsiYZKNywgjw== X-Google-Smtp-Source: AGHT+IGCs8dPtm1rixmNgMSO+WWV4IhKI5IowEcYD8namxa/q5kpF0N/cHIgK/v0MzRk/SbJbCaN X-Received: by 2002:a17:902:d507:b0:1f4:7db9:7366 with SMTP id d9443c01a7336-1f47db975d8mr95456015ad.29.1716894031863; Tue, 28 May 2024 04:00:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716894031; cv=pass; d=google.com; s=arc-20160816; b=cgb0wk8rxRLwcyqu0PeF6V/0Qj+90mUKZp4WMCapcSgMHQMlOvOZMHE1DL8fhGfaR6 4g0i9r+h7Z4sq6YEkKi+/B0zCRs7X+FPxo8hPCCWXGKEnINVFdCScx964U5nwqH8bBvY p8JPvE2AjZeeOR3WecZqgD5Zh+4yHiWMRv/DL8WBulsQAUUBYlEJ//0XEbOsvHVsdwIr 89EeBwjQTry0tnmls38xetU2EgcexCG26SooVKmOLM8LDi6EkGJsCVTlXFAkxSmVVCQP epqBBypb74bH0TFRQrDnOg+QTHpnyiyhY8e0dvSEpVr4UyaKJPTRp8hh++GZkWpGbHaQ q2tg== 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=08Pjg0G2vIk4k9jK/kwW+T1ieKnaEDqG+4zWQRXr9hw=; fh=ub3wsJtz5RiFDtOFaXUbEw/WxKV52NLLWLX9CADkaX0=; b=l0tyKkXgxyKO1klELI+TympDB12i4pURhR/GciwucBqzXr4v9cu9OChLRyTAWqBgh2 r5o4IF7L07Xiz+EIYqPJg4R0FzkldDsCEzKnGjmD0tRBVP2G2ysxF102/u9uvma4HKOy qWQfnKQg0sHEx7/NujtTgU4Ust9mbFhsiOzoAlp++9nZogaUYUteWOjc56r9IB6GDbtA qXE38phxUHGcyHWEQuJlHxBSz3Eui6BHo7bMGRh/LB13cXk/ch4SnlFpyKfUSRjEbTW1 XJOTHxFYVIpxQvoPQtjPIEAAWXzSA8M+IrP/hAKchNU4+qWm60bq+kZIZ+dKbU+aP5wU 8hVA==; 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-192122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c971b0csi78254085ad.325.2024.05.28.04.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 04:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-192122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192122-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A1D0BB238CE for ; Tue, 28 May 2024 10:35:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49E8C16B72D; Tue, 28 May 2024 10:35:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 805D813AD3E; Tue, 28 May 2024 10:35:38 +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=1716892540; cv=none; b=Ms1VDfwixw3+i7PVzBSdOyefsxTKA1XuJgJ2h8hTITWjl3qMvwx0nyoqdKOncQzJoct2NtsituIKd4D/DtrbDD45G8EIsKJjlOWH5zf23K0YGWh4SJ0z1xxirV8v0hXoaYeXpS/6Whc3gGgg5VpH0pMK9FqGWn8aOLTUYFPvCYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716892540; c=relaxed/simple; bh=hVV0lCQ/MHFmBqjNr9W7erWq4n/YoJx9UYV3uZmC7Mo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MlB5598eyAXnfwUTxDeNEXUHUkcS4i1EERHFdbzU9spflyBPpz5KuivP8QcJLyq0dFbvZHixLQCOpqCx+nbQBEuThkQQo6+73PKeSOnE5hWcMrZgagvo4/BjAi7qX1WMqqD59ltfhtZ9dPUrXexBcTSMS099wUlzW+IZ30v1WX0= 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 91403339; Tue, 28 May 2024 03:36:01 -0700 (PDT) Received: from [10.57.4.203] (unknown [10.57.4.203]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8559E3F762; Tue, 28 May 2024 03:35:34 -0700 (PDT) Message-ID: Date: Tue, 28 May 2024 11:35:34 +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: Vincent Guittot , Qais Yousef Cc: Kajetan Puchalski , rafael@kernel.org, daniel.lezcano@linaro.org, lukasz.luba@arm.com, 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 References: <20230105145159.1089531-1-kajetan.puchalski@arm.com> <20230105145159.1089531-3-kajetan.puchalski@arm.com> <20230711175814.zfavcn7xn3ia5va4@airbuntu> <20230718132432.w5xoxbqm54jmu6n5@airbuntu> <20230917010516.54dgcmms44wyfrvx@airbuntu> Content-Language: en-US From: Christian Loehle In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/28/24 10: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. > > IMO, we should at least increase the utilization level > > Regards, > Vincent I looked at teo too and what you describe looks reasonable within my expectation. Could you describe your workload a bit and details about the (I assume) power regression? Maybe compare with 64/32/16 as a divisor and a hack that doesn't override tick_stop on utilization? While /64 might seem aggressive (maybe it is too aggressive) I think it tries to avoid cpu_idle_miss on c1 (too deep state selected) much more than c0 (too shallow selected), because the latter only costs us some (small?) energy while the former costs us performance and energy. Basically WFI should already be really efficient and thus selecting anything deeper be avoided as long as there is still some utilization. But I'd be curious on your numbers. Kind Regards, Christian