Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp181587lqe; Thu, 4 Apr 2024 03:42:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9Mtg9sCRImP6IJ2asTpxS63Mxg8L4zvLr2s1uaC/El5umnH3ZDvZvBS2w7FLmv2Usi16mqWGa7R7T5w/9H24xtjnvW2QrIZzZWq+XOQ== X-Google-Smtp-Source: AGHT+IFAbBVFviwsJC+wk+mYkM4k0FY/jFfWGIVeFBwVQIE9yg9IEYjebjeOWpjVPhPZFMVw3FVi X-Received: by 2002:a17:906:3b11:b0:a46:ec44:477c with SMTP id g17-20020a1709063b1100b00a46ec44477cmr1138111ejf.41.1712227343674; Thu, 04 Apr 2024 03:42:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712227343; cv=pass; d=google.com; s=arc-20160816; b=ZxQL9knSTQy/KL6iRVUgsyGK7A1qDkR24B+5B3i6OD3lO8mNpeFycsMmotrI0hTkOn DU7RgOz/NiJXZXeCf5Dk54A7Z4jHKNUDk/rhOMDY+zEE0wDfMn7vzErHZz7sshrLneO2 sFszu7ql+XIylG9B30JAGksfeF6aqpqU5IicHp3WVlUNHmTiswdpewmbJ4iECVaWh/4+ jTbxFO2Rn+Ek6e3JH7eqlCWdG05doRo1UPBIk7i6chZLkqeUEJcW7TAw/ES6yR09WFlm MdcGqMi97U+0xmrCFiIko1fq2tTO5BmZ14UUqP349GyvaZzAVjDjtjamSqTCoPqAaCss Mj7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=pMlr4ISB96FS0s1ezgMhw1dQVyqmmEV48Kuj+0pAf/8=; fh=5Xp4QbRPalMWQf8O1zUXBV27/k/3FF5nyImq7LUTGuo=; b=lqByQTl/6IPgJ8MP0IrSLkuXEUgwfHVu+hbrtO5dK62HxhJpVot3HeIFfojzXDPLL0 AsxkLZCmH6CY7dzUMDGBgjIkA1Kptpr4w/b2PLJHhDn5y1/VTCGIiqmCmD8YGT5gb10R jmz6UV3++hpRPaWbEa37GlaPq/U58lH4WT1Xn35P6L63CtGRp3hoLMkZMWaKYobkVVNO j+CvGnaoF+CLsZ4xoUJ40NjzUSC7xnSjdboXe5XKp0cZE5S7rMu9XH3cDZ9xlgcYPYQ8 EExtswHXVyRo9qH6cc718mOCTD8UC61fe/zBg4E9Uw3um4OUj4Os6xdk4Dgx6TH/N0hx 25uA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QtP9R+E8; 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-131249-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131249-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 f20-20020a1709062c5400b00a51963c0410si24400ejh.611.2024.04.04.03.42.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131249-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=QtP9R+E8; 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-131249-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131249-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 6D6CC1F22A3D for ; Thu, 4 Apr 2024 10:42:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49E757F7FF; Thu, 4 Apr 2024 10:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QtP9R+E8" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 AE211745C4 for ; Thu, 4 Apr 2024 10:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712227330; cv=none; b=Jx3sK1aGUCEWBIKNrXAdxznDa7rRicWRTW3ISYRsiIw3tLEH4YaThxEVZKL0HjiyRq+BuN0z2B1MoGpbiiOO+aKxeAvvJUbBjXhiuRoDpP4ygrYbuRj89ud59AoW3rjj3hilM3nCWjQns36/trn53o3vrgbF1BGAF0eKO3K2ovc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712227330; c=relaxed/simple; bh=F+ImSYJLyugWmmAj9uepc0So3V1g9t4KB1p1y7LgtK0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=I0wpbDlyeNgL4OlU+qJ/l/fYEkDKqEjh2ryI3YkhMxnz8VuyeFtFXkaC9WdJnOZg3EeY0sHqZ1/ye0xdFE0MVpCiOXg8zv14Dnwo0srw6+2asYuAwpWVj+MOWdINUWUcrdnqU50NRQHkEDIA5r+D4ILSFhz1nDdRTXvPkpZ+RWs= 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=QtP9R+E8; arc=none smtp.client-ip=209.85.167.45 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-lf1-f45.google.com with SMTP id 2adb3069b0e04-51588f70d2dso1044625e87.3 for ; Thu, 04 Apr 2024 03:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712227327; x=1712832127; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pMlr4ISB96FS0s1ezgMhw1dQVyqmmEV48Kuj+0pAf/8=; b=QtP9R+E8ezCozggvQyDR1mJke6OsMUOyu6vQ3E298gdKVrcvIvxiRKNeucmiQSp7Aq 6poRsIp7xyyBboZfHbVNQn+hG17nGhoYHs5ZUhgJKO7YUtl/kIXV2i8aw1NdnzEVvShC 1ZwYZHzPVVAXLsI7Q4DM+/d/LW9yoBYu4AeFjVfR4qKEeWUmQA4fqOwojPXSSo93CAw5 GYA8SPRTnkRWuC2c14Nt6UrML/4JmLcwS6LV/HVMd0VDZgfnIODGLQBbH1SmsIdTztl3 ylMx2/oAOgJ6FSR6FpEeUuMSbHwEdcyiijJqYWPqPJSutR6MQknbQbMSwFn6RXTLicyV N49Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712227327; x=1712832127; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pMlr4ISB96FS0s1ezgMhw1dQVyqmmEV48Kuj+0pAf/8=; b=dKWr7o83UXBu73//AWFmDZkl7Nv3FQcUnXIga1oIZv5A7JYO8CMHuOlzLvV0R7LCEs O/Qrj9odq0Qla6sGT1ewtYYFoLTp4Wdi6rpE//Teegrn/qBIoFKYAZ/Ug0Bu8YscP/XX N2ucCt2OCXOUybGkjY427SG5MpUTtyXlQm19J179J7ClUeZrd8Cc4mRrdeI8H5DRvSg5 Q48K4w9m2GnFgnMNnxWQrsD35k1e8od+B7+eboAGOamzWEzIjvRptxb0UKgPyEVzIaKE IB/y6jdl8k7bRm6ZlmrlSSrm3GXnuMcz7eYFwCrqreubi+45X9ZcD/SqXdmfRhClEOYN LRtg== X-Forwarded-Encrypted: i=1; AJvYcCWNanaMxNKrlcLOww8qH0jNRHKrLoPp14Ny9oBbKYZaMQQApn8dv+wiO6Hz7/VPFoJs3VkSgo6EaTdIpzY2GeRYus81Z1+Dt5ELavwb X-Gm-Message-State: AOJu0YxHlQvC1xSbiOBfTaDY2Sgm0v8sJmYBMCBsO1BiP2S4461Ce40/ gn4rD9+9aQvcpOcuEt/Aw+tps44oF9oH5pFGObkg7/o6n48JVKU/BXbKBn5TN9A= X-Received: by 2002:a05:6512:282:b0:513:dda5:a379 with SMTP id j2-20020a056512028200b00513dda5a379mr1513517lfp.57.1712227326729; Thu, 04 Apr 2024 03:42:06 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:fdfa:a65d:5f57:ba15]) by smtp.gmail.com with ESMTPSA id k6-20020a05600c1c8600b00416244a53b8sm2309923wms.4.2024.04.04.03.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:42:06 -0700 (PDT) From: Vincent Guittot To: lukasz.luba@arm.com, rafael@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dietmar.eggemann@arm.com Cc: rui.zhang@intel.com, amit.kucheria@verdurent.com, amit.kachhap@gmail.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, len.brown@intel.com, pavel@ucw.cz, mhiramat@kernel.org, qyousef@layalina.io, wvw@google.com, xuewen.yan94@gmail.com, Vincent Guittot Subject: [PATCH] PM:EM: fix wrong utilization estimation in em_cpu_energy() Date: Thu, 4 Apr 2024 12:42:00 +0200 Message-Id: <20240404104200.1672208-1-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division") has added back map_util_perf() in em_cpu_energy() computation which has been removed with the rework of scheduler/cpufreq interface. This is wrong because sugov_effective_cpu_perf() already takes care of mapping the utilization to a performance level. Fixes: 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division") Signed-off-by: Vincent Guittot --- include/linux/energy_model.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h index 770755df852f..70cd7258cd29 100644 --- a/include/linux/energy_model.h +++ b/include/linux/energy_model.h @@ -245,7 +245,6 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd, * max utilization to the allowed CPU capacity before calculating * effective performance. */ - max_util = map_util_perf(max_util); max_util = min(max_util, allowed_cpu_cap); /* -- 2.34.1