Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp311566lqh; Fri, 31 May 2024 01:58:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnT8262YKuY+Dpq45zr9C+NF3Jji8ei2l0nrikfWalrRP45GKb8awn+nsEhQL7Uhgtq8UkLmdIQ/5hKM/leQMVKU3Uxy+uWYh0WIP5Tg== X-Google-Smtp-Source: AGHT+IF6xGgvkHb0rxS8lD9IhKTEUDZXH59dTX4HeWMESlyLMQb8xc8BZke8gVQYaHZlBE+AO5lb X-Received: by 2002:a17:906:1c57:b0:a63:5544:339e with SMTP id a640c23a62f3a-a682090238cmr90276266b.39.1717145899244; Fri, 31 May 2024 01:58:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717145899; cv=pass; d=google.com; s=arc-20160816; b=Rb/jHafOBuAhkyAhHmZbbpuXq+4ptouFuYZ+YecLG+Y/caA0FiK400kIspUPp+SbOA CYym3MYupXKgVukI0FrXOrC8P3hQsI65e3t4QvMNUPb3oye/fZ3l/IwSuOTfwI51PzYt YfePhBP8GVLJcY3vTnE5g0ItOCHlQ5SnZo2NwdeZBBdWDTBil41qmYovjY2EKIWc3q/E kcXmDLf2PkTmE/tGIMxPGUwgrrUq/5CHhy36vVwsuKe44RA2GCUV88Zq80LFVKDHp6Xt zD3R8+sPz8PNKcomYCxIntlj6AKPaJs4cQQjLyG6vBRhkdJ4nYcPg+epDgkrrMu9Stn6 jauw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=nPlAccRu1ht0ugLS/YX5R85LXm4AvuNcIW8FJ60Xapc=; fh=XiWr/0iqybVUxGY6VEukIZ4YmfkaTUYPW/BkYcrGFhg=; b=y/rw3KEmVKxlZ5klIgRopLwDWpg5uNvYUZDCY6WXC6E+sEOplvGmT/3jmK/A3Z1i+P kqsPycG6THdhk1s+sik740hK1HvfLoNl01Rt0C4Rv23Vei4NJOj8x5nSk2nJ0lNcGL8i CupGLE6maocAFhzb9LUxYbw6kN/KXkW/A8QoH8YUacAjqxSZX8jwXb/nedQkSRRO53Jj Dd1bH64tvOFvOp5SOnjBYYd4jctC1+G5oE0Jl8plO+22ywIZQugQebNCmG5c2Hb/e0FP DMlO2oyNkkOmU1GxIP/gkIDIIRcYc7siFJOMEsXKFUXMC+BTdR/SUwswAjm02mgJnnHC NQ9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tiKDy1B2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a67eb8183d6si69041666b.1021.2024.05.31.01.58.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:58:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196523-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; dkim=pass header.i=@linaro.org header.s=google header.b=tiKDy1B2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 DFE721F26A63 for ; Fri, 31 May 2024 08:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72E7513D297; Fri, 31 May 2024 08:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tiKDy1B2" Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF7A381AC1 for ; Fri, 31 May 2024 08:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717145863; cv=none; b=EoEN5/YFFmzf7KKbWiW9L8ES7T+u7/CSdrvwmJLtEEX2TnQT9if9MI5ClNvjZIh3cGlFpYuD8BS8XOOPXK6VPnjyq8DNgzuKTVUriHpAtZ2azMCDS8UNtV5UpfkKcThXAVYo0IF2ZxV7U4RoqRBtE5SruMaXQr8QsBa3kxFQduk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717145863; c=relaxed/simple; bh=jGp5xMVbjd0tUmykpevDlhzB7AOsvsUsk6fB4tAJBRs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Cm9G7rGbrc6yIxJwq3aBHs0ncXkVAvr7Zq68ziHEY4BiK7B9ipDr262Z/2XBS/Pvh21heaCK0x5tlyY389KjsUj3iY+i+CvzNyVE3rbSnrlyA7Ajt5035dAK3aRRfKGbee2dNS4p4LXXeRRcwkQ+hoWQSgNOkSwsRX1ihDcSs04= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tiKDy1B2; arc=none smtp.client-ip=209.85.216.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2bde007cc57so1313386a91.2 for ; Fri, 31 May 2024 01:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717145861; x=1717750661; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nPlAccRu1ht0ugLS/YX5R85LXm4AvuNcIW8FJ60Xapc=; b=tiKDy1B2hwFCqw6xuI3fWATDtD3MomsjOn2FlwD1SnPrzBOdxV/w8s7Zb5rkAoR+C9 7YgbN5QzrEkrWOToAQJ3XFjNPeYEk07Lqk8a12l6i7+W6C7u4jIOcaTlVXq2NhxwUCPg gFdfuPJ3eyJ0hxHZnfB0ro/3LLVoz7qSqUkVLDKGuM6rFqDRnNiZACt8sL1vclKQuLmf v3sBRq1bUyS6Ro5K8Yt0uyH4ObkjqiDkYXdcq0Bbs1ayXKXZSSlIhhr6lkS4kN7P44mf o7QdSvYXB5nw8GtvWQsUfaWi8Dboxt7J/7Ibgtw5rrNTnVQ8490QigWXFGuKeq4eCJPx hpgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717145861; x=1717750661; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nPlAccRu1ht0ugLS/YX5R85LXm4AvuNcIW8FJ60Xapc=; b=MfXirAu5uwkEl4KWwMtmtwYmcamGVnGf59rS2b21I5t9QGq08AjDzW+A0iXM1jYH5B BD3q8IQKbJtnfWxTELjFT5nLMQaMjnqwBf1zgxpFfJ0zs81991BmkQNZBuV5607WtX8Q h/vIjLb0LUwTitZNpHHqwRQ2QkG6RkGB1LAjdFzumChbUhDvEs+PI5YgUkgBVfOFN5a3 /zFEzRHDZVX3egvNrYkMazD9h73WTYxvGFaCD75ANVqnJTDel0jjdC0RhgMOSs476Hhh q85QEdkFVy/+x1qVM+hnofvRcKl6/JQGb9aSJS8sSyOd5CFHMN6jbgwrUGGuDfGVF8z3 xxbg== X-Forwarded-Encrypted: i=1; AJvYcCWk5TncWkYda3dEMOJa8wvADaznSBrexnrs4DYcgjkNc2G+obzzxDaq5oahP/HPFnmI+Fe8I39h7o/81CV+0+A8BfH47I/J7WmvVZu9 X-Gm-Message-State: AOJu0Yzyo/51ouA7r2UOA9EfoJhZvD/Bwkz9xsW3K6ysKmDKfhz4DK+l l+rw2aLG7IGKmcBhWd9xHNsB+Cv43Qs6SHrgDgoFg2f8ilSjTRZR5ZcXqjCxBEafR38Bp21TcLV aGczB9eJQrMqiBfuX8fxY2jLt0h+bET0lJSyzjg== X-Received: by 2002:a17:90a:bf16:b0:2be:9547:41a8 with SMTP id 98e67ed59e1d1-2c1dc5d9f17mr1081334a91.48.1717145860631; Fri, 31 May 2024 01:57:40 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230105145159.1089531-1-kajetan.puchalski@arm.com> <20230105145159.1089531-3-kajetan.puchalski@arm.com> <20230711175814.zfavcn7xn3ia5va4@airbuntu> <20230718132432.w5xoxbqm54jmu6n5@airbuntu> <20230917010516.54dgcmms44wyfrvx@airbuntu> <4cd905e8-594e-4858-89df-a501184ee521@arm.com> In-Reply-To: <4cd905e8-594e-4858-89df-a501184ee521@arm.com> From: Vincent Guittot Date: Fri, 31 May 2024 10:57:27 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] cpuidle: teo: Introduce util-awareness To: Christian Loehle Cc: Lukasz Luba , 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 , Qais Yousef Content-Type: text/plain; charset="UTF-8" On Wed, 29 May 2024 at 15:09, Christian Loehle wrote: > > On 5/28/24 15:07, Vincent Guittot wrote: > > On Tue, 28 May 2024 at 11:59, Lukasz Luba wrote: > >> > >> Hi Vincent, > >> > >> 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. > >> > >> Thanks for reporting this. > >> Could you add what regression it's causing, please? > >> Performance or higher power? > > > > It's not a perf but rather a power regression. I don't have a power > > counter so it's difficult to give figures but I found it while running > > a unitary test below on my rb5: > > run 500us every 19457ms on medium core (uclamp_min: 600). > > Is that supposed to say 19.457ms? Yes, it's a mistake. it's 19.457ms I forgot to put the dot when copying the value from the rt-app json file > (Because below you say idle time is >18ms and total test time 5sec) > Is the utilisation more like 1/20000 or 1/20? > In any case what you describe is probably an issue, I'll try to reproduce. > Note also my findings here: > https://lore.kernel.org/lkml/0ce2d536-1125-4df8-9a5b-0d5e389cd8af@arm.com/ > > Kind Regards, > Christian >