Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp270066rdb; Mon, 22 Jan 2024 03:49:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9mnZrV1K4BJi+2rHbxOVV2CjbESWN4pft5k2Ctp3UGuq6a5dodyI7lrhqmWe0oH6k6AdO X-Received: by 2002:aa7:d50f:0:b0:559:b411:fa87 with SMTP id y15-20020aa7d50f000000b00559b411fa87mr4672931edq.20.1705924198397; Mon, 22 Jan 2024 03:49:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705924198; cv=pass; d=google.com; s=arc-20160816; b=CR1nEL+LZwJwPC2FPXQXBdwSMssycOSHGR/I9i1lZAOC9e7Az4ru5pUuD/0uY9qJjM hDJFWGF9nMkjaYMlty63i+jhXkU0fEMT91lfx8O7gxvftFjhOxS+1QxQDz1Nmci9wGne /tGNB2mYrk9TDJ+5ahq8L/kQe7bsLR6xD8/RFl74vb6iIr3RWfyRVJ/KroSp5LgvalrH QJxULLIqUeA2dXBufpQPxazUuc4CnfCjoWaU8vpK1imbTzn3GVAjKcrzmSQQPq9nxqKK VK5suv/GwCtGPHdsbFtcsk7KL71Cegb9+QVFUtQcppXpoTOOsKGco0NhfW9/bS+SkWan phJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=Xu9dO42e0kGtP2iek34Ct8qcatx6D34+espsKKYUB0k=; fh=Gs/oQc6w+3AuI5rGs6Sef7O3y5TMgb18ncwM+mD6qeI=; b=d7Lnj75yvUif0et76D537fdyQX7XEZXjUklKz4pC3zcOKeBl169s6WiPkFex4KSOmU RHP8ajGi8LMTxLwEAl1F/9UAVhwNeEoVdiR9jTQgrRPvRpIP+3K9c18nm5NVlz7eaGQS DZxyb/vt3Vvx6e/C1qbtgPoReYfQ4lTo2vzHh24fkc4ZWnFEad2/dqO5DIGQS6w3DzyG 1farZvl9tFyAbi71NfM+u1s9EwJew2QjyxzznOch9jIY2mJaCC8kLD+cN5o/wbRMKgJY Ljsp29CHrAQ8LlIDCSr+ORnfZpyOboavZ9QMkivDs6ly+j5uAM+jfGf2zp1mQAayQCfZ H4UQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a0564021f8a00b0055995bb6933si6526574edc.549.2024.01.22.03.49.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:49:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32962-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=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 2C5E41F288DB for ; Mon, 22 Jan 2024 11:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E449C3C48E; Mon, 22 Jan 2024 11:46:58 +0000 (UTC) Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.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 2242439ACC; Mon, 22 Jan 2024 11:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705924018; cv=none; b=CwLKnJNsxmNEgYYBS26tY2h29C0nA4gw5HvqzRSOeivXNfRNCJLmHeJT8JEGWkS0jDgGJKSgY0fOu6o+mHDgV9DwEd6VVcnGBrBY1XpNEUqLBzCVsgGFzknUJBnJqGAPHMQpafgZlD+VDYGsTL/7NnQ44Dg60tI8LsJ9mVsRZkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705924018; c=relaxed/simple; bh=Xu9dO42e0kGtP2iek34Ct8qcatx6D34+espsKKYUB0k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=d2RCdLdLKUHBvIbbsnvIpmBPNkpXC5JFMY+9FUycI3JSjwZyUsACjj6Ydjq/eXtrgiYsi6IonJDXe8K+SQBWYOwQLkYRwGAGIkrlYIcB+wfUXPHsbJrDx+Mmrmi1N0y3DrekXdBudrapY2dZ7iNq/h2+fdB9BCNjJoBe94csT5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.161.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-598afd970e4so444465eaf.0; Mon, 22 Jan 2024 03:46:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705924016; x=1706528816; h=content-transfer-encoding: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=Xu9dO42e0kGtP2iek34Ct8qcatx6D34+espsKKYUB0k=; b=t40yxUAs45IY8vOSH07VRXYtgly+2p0OSwT6psBy0nY+w3T06u2mljjfDeTrjAF4Z+ ZLL8sMEbDYla+OR1gW7lzBhNUE4GyDlZ3ZkzlZONSiJPm2fZVgLBSVOGPj6nGP6o4FSR 1PI6qFz1ft5A9CBf6RRNMdSuQcWp1qDTa73osllZJYSsdUk+gimKgSozVBhSNHlskRxR Waxa6ipAOpqfOCH2w+LFBn9tY7BA3p1sTP0QVPf0UyNsgofajLNJPQmiQSVK21tb1hUI Gjmn3vvI4p+eDH0v0vrlSn2RiAoH76emtRUCA3FduAvO3qoLLQBGzGR/W6aKYW/ienwX DC/g== X-Gm-Message-State: AOJu0YyqFNYi/KK35scnejnPIqBm7ADiIitKMXpOKY8NP1dGWSXMr3B3 hWqNOCS1zK007N8zOhFMIfo81ukyc7dtduzk3TduyveCH15DumYIPR2ux/uB5O56h5SWSdInOeb aoUAgRXCGx6SsiNC6nF1UHJpDMek= X-Received: by 2002:a05:6870:2193:b0:214:2425:9962 with SMTP id l19-20020a056870219300b0021424259962mr5660544oae.0.1705924016139; Mon, 22 Jan 2024 03:46:56 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240118120513.1018808-1-srinivas.pandruvada@linux.intel.com> <6021639.lOV4Wx5bFT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 22 Jan 2024 12:46:44 +0100 Message-ID: Subject: Re: [PATCH] cpufreq: intel_pstate: Directly use stored ratios for max frequencies To: srinivas pandruvada Cc: "Rafael J. Wysocki" , rafael@kernel.org, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 22, 2024 at 12:35=E2=80=AFPM srinivas pandruvada wrote: > > On Mon, 2024-01-22 at 11:53 +0100, Rafael J. Wysocki wrote: > > On Thursday, January 18, 2024 1:05:13 PM CET Srinivas Pandruvada > > wrote: > > > Avoid unnecessary calculation for converting frequency to > > > performance > > > ratio by using a scaling factor for the maximum non turbo and turbo > > > > [...] > > > --- > > From: Rafael J. Wysocki > > Subject: [PATCH v1] cpufreq: intel_pstate: Refine computation of P- > > state for given frequency > > > > On systems using HWP, if a given frequency is equal to the maximum > > turbo > > frequency or the maximum non-turbo frequency, the HWP performance > > level > > corresponding to it is already known and can be used directly without > > any computation. > > > > Accordingly, adjust the code to use the known HWP performance levels > > in > > the cases mentioned above. > > > > This also helps to avoid limiting CPU capacity artificially in some > > cases when the BIOS produces the HWP_CAP numbers using a different > > E-core-to-P-core performance scaling factor than expected by the > > kernel. > > > > Fixes: f5c8cf2a4992 ("cpufreq: intel_pstate: hybrid: Use known > > scaling factor for P-cores") > > Cc: 6.1+ # 6.1+ > > Signed-off-by: Rafael J. Wysocki > > --- > > Tested on the system which showed the issue, this patch work fine. So I'm going to add a Tested-by from you to it or please let me know if you don't want me to do so.