Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp192264lqe; Thu, 4 Apr 2024 04:05:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwk/Yx+vzFXxyNJ58GFJkgwkWV67Ycr0TVMcO744ZpZP6U4GnuXsYsBsf+MnBRczxacnvvkf+kJ+FyIFs/KKl2IXvUiSQogH7gQowtgg== X-Google-Smtp-Source: AGHT+IH3YE86pZndNGPLa1nRj6hN4rp3jRisWVmI23wrK8D09w95ua5eyUX3uCb5rkvJceQH5/tg X-Received: by 2002:a05:6808:bca:b0:3c5:d998:7195 with SMTP id o10-20020a0568080bca00b003c5d9987195mr551623oik.11.1712228752133; Thu, 04 Apr 2024 04:05:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712228752; cv=pass; d=google.com; s=arc-20160816; b=iPg/HXhocb5gFilFcTHW2pgYDAVimDEf326mNp3FkzbM2fnpQikMKAtsw0xjFDa1bf 2jDi7dDCl+C25PFp5hXyrBIi4CwjkDWi/5KE4eliPvj1boZPsZ5mwUHwImXNnfGrGZHD SeeCsFJT3fRF0R4g2jIWGDBi7WBNc2Ua0IvHP0tQL0mXyV2I+NegNJBBjmb+WvfKjCEp FNCudKHkKS1jQh2WLm2NHplmqxNEtC3OawS8y2TZwGcJYX7or34GuHmF2BSgtlT3dwuJ B8lygx2Rx9GMu1/3xptewl6fGxGB6B7GMTaItBooEHzi472JiXMdi0u70AYoSPhLVA4g r8HA== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=pKP0A81p7MgT28P25Tl4bfILtKY9rizF93F8LABKSqk=; fh=tJCk6SAmmXAI4B9EufDqJH+5ghuHorw49PfMYxDxuvA=; b=SNjXdALYW2E9KCFcZMd4Q/e3SU7krYTvPnv2cXZKb76WsO1v+qbhBsOTR/bZgKDPTU Y+twZ6L0z24/1ABPjB/WiTt0Vv0xsgWajH65tAMobdOaPPNEEyxM3hjUESyg1KUsyr3O KdJGfDqjr7XXzY7qa156VKyFZOUFBymLfrHNeBAz9N0ZnXma+CrAoq2rCG1kMCCpYqhG 6zINo9uAX1th/+vnduFRduXjDfk4GaAuPw3wNAad6dK9RtO8RlIkWkvZ5tQT2uco1Sgy bLslz0/rjXnR1Qa01YxFAXK47YxyLFYpF+3tl3eD0KNpLQMxBNw5ci1tCcTIPWberpUZ GzRA==; 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-131288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131288-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s14-20020ab0270e000000b007e35982bb9bsi1113218uao.107.2024.04.04.04.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:05:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-131288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131288-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CB0241C20E8F for ; Thu, 4 Apr 2024 11:05:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 495FC811F1; Thu, 4 Apr 2024 11:05:45 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D86A959157; Thu, 4 Apr 2024 11:05:42 +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=1712228744; cv=none; b=h2r5jUNfZ75Q+QfS10JacV0LGJ0QAgF82BriDqIRrl7d+ErLKCo2PQhO5UsK8OLLRX9PpbELRXSXiwXOBMVq6k+hZBfL5H5uQvTO9VEWBeQ6tgeMWp8+dviB8tIx39M55lkXmNNPDyN+4zg3xDwR9276lNL1gf6kZGRKWYmtVF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712228744; c=relaxed/simple; bh=wdbjKuAXBag0wP4Mj8I0Q4F5Fo+sCqKR7kQJZok6xR4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rj8Sc0idq+PjoMY180ZSjdlrM1dI2GX++clcoxqYzxaW3dBjcGvRZuOWMtigGpn4PSBP1bcyk+xEfQp8mxfDFcsBdfN3zBKKF8AQjYYoVRh7EI6MG+ynoz8FxTrfJ2qr+06RJYk9w01B3jMgJhQSnTuNJOU9speuNO+WsAWY9GM= 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 C809BFEC; Thu, 4 Apr 2024 04:06:12 -0700 (PDT) Received: from [10.57.73.43] (unknown [10.57.73.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E2E13F7B4; Thu, 4 Apr 2024 04:05:39 -0700 (PDT) Message-ID: <7ecd3ec9-6990-4d3e-84ae-d0d3a1cccb78@arm.com> Date: Thu, 4 Apr 2024 12:05:41 +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] PM:EM: fix wrong utilization estimation in em_cpu_energy() Content-Language: en-US To: Vincent Guittot 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, rafael@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dietmar.eggemann@arm.com References: <20240404104200.1672208-1-vincent.guittot@linaro.org> From: Lukasz Luba In-Reply-To: <20240404104200.1672208-1-vincent.guittot@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Vincent, On 4/4/24 11:42, Vincent Guittot wrote: > 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); > > /* LGTM. It was developed in parallel IIRC and that change which removes the extra margin to the util was lost from my radar. I can see it landed first. Reviewed-by: Lukasz Luba Regards, Lukasz