Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2291450rbb; Tue, 27 Feb 2024 18:07:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTcQZ60STkQOv/6ONKl0e2VvrfKBtcUJrwofrCtqF0O1nILHB6Mb+GKUehRtD78+eJlHxWhgLbM0YAx1guYfPB05z5MjUqwkm4D4YM+g== X-Google-Smtp-Source: AGHT+IF3js/jgoqtafr0AebH57jjktQuiKqFHlBMf6NhyoAqz0xa0QSYyQz89my3rD5u9rlfT77A X-Received: by 2002:a17:906:d8ac:b0:a43:396b:c7b1 with SMTP id qc12-20020a170906d8ac00b00a43396bc7b1mr5367625ejb.6.1709086072396; Tue, 27 Feb 2024 18:07:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709086072; cv=pass; d=google.com; s=arc-20160816; b=HoOxiOqB63vp01HKPNIY3w3TDFLw6g7l6jsaZxLLNgDdngrwhtVp7TMh5mPDCZfU1u a4hzak0IBxW6Lobgwag46nBksumkhmilxrFidIW6deLfERRQGt+X5jQGW0t4keGlu/tY uWlY0wbYPV7S6KDV3ghaWE6J6oCGjhpUxg+9Ur9pW3HApPKsheJ7igW2o9oqMuRIhtlw BNETUc3T50vG4IoI1aeoTAOOFLid3ZQ8Xe0URyohgdDZfA6CJMD9uz9IwHolBDvwARzz HFIfgPUq38331thdz7emkb131g4cxRKZpmuIuhDOY+mdNjIHxy30b8Vr6BHO1RVmtrBz pXtA== 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:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=+4jSik5WcV5NBUH8mbXhQJVmLdyj3XlLpuIOO7dcgXk=; fh=LuIKSNerHJGITBFNnwQd/+Jdu7A0OAgRGpv40bUDnIU=; b=vPAeOuVSKTxO9/jYp1GjPziSgwkygMyqjLyu237UqzgGmgN+bg1vu9cUYCbWipdEXa UMJI5jnYAJ4WMOV+WVcfmF5InQTftxHiAw0MdYsJCr8jcxlcmQwBozcJWIzxXbcXODzs OSnWltUVQ2yx7cPJ0M5/sQzS55Mq7ddj8WFwMZCUNlAIZ9lb+uoRF1Q6nA/jCOiyOJ7F 54x7hHsmhJkkuQilC6tDT4i6ALFuS40ujEE7Ti0FY1Y7/iqEiYDufq7oMdrQgOlZ+qcT pZhg/NpToky31ZpFFujjB8sD4hpM6beoPIVgWRT5mTl85SDtKtO4GEfGpLHj8nNTF6c0 nI8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-84401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id js6-20020a17090797c600b00a43c1e0cef2si889602ejc.2.2024.02.27.18.07.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 18:07:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84401-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=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-84401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.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 am.mirrors.kernel.org (Postfix) with ESMTPS id C0F411F23D81 for ; Wed, 28 Feb 2024 02:06:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9759C1B7E9; Wed, 28 Feb 2024 02:06:26 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3A364A1A; Wed, 28 Feb 2024 02:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709085986; cv=none; b=ixqP3XYWZVrdWzkBkGONwJRTHccSmh2Rtctf9NuzTm+qVQqATgosf/8JJDxUUS1VwhWRp5F1KEtVLk7Ahz18p+DE/AcSHTRH4Jipg3tmRsA5uiHVhgFHGEAj8IHE2avc8uxI6DAgmE3f9HG8NLGv2eR/YOSj4bASLFvIsupwUos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709085986; c=relaxed/simple; bh=tU4y3J8zVMd5QfhtV8M5FVK9IAtu0tz/78Ppn6PVxNQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=LnT5FnB+FabrdbAFaHAjvr33CrGTJu1u/yqsu3ldh5rlWQ65xfYhQxyH1f2qDbLfSq5y2ZaYu00Y4QFjgq7A4U48IQ/7zEcz/998a5C0pcJmYkCHPMIIrUlmxF1GwHjt4GtOTGMIK1a21wzlBmLcCfqEuV0qz0Fver5kzkvmSA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com; spf=pass smtp.mailfrom=hisilicon.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hisilicon.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TkyNJ0r5HzNls1; Wed, 28 Feb 2024 10:04:48 +0800 (CST) Received: from dggpeml500019.china.huawei.com (unknown [7.185.36.137]) by mail.maildlp.com (Postfix) with ESMTPS id 513F3140499; Wed, 28 Feb 2024 10:06:18 +0800 (CST) Received: from [10.67.121.58] (10.67.121.58) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 28 Feb 2024 10:06:17 +0800 Message-ID: <91118802-eb8c-6225-3610-05e16270b3c4@hisilicon.com> Date: Wed, 28 Feb 2024 10:06:17 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH 0/2] Fix per-policy boost behavior To: Sibi Sankar CC: , , , , , , , , , , , , , , References: <20240227165309.620422-1-quic_sibis@quicinc.com> From: Jie Zhan In-Reply-To: <20240227165309.620422-1-quic_sibis@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500019.china.huawei.com (7.185.36.137) Hi Sibi, Thanks for pointing this issue out. However, I can't clearly see how the existing code fails. cpufreq_frequency_table_cpuinfo() checks cpufreq_boost_enabled(), and that should be already set in cpufreq_boost_trigger_state() before calling cpufreq_boost_set_sw(), so presumably cpufreq_boost_set_sw() is supposed to work as expected. Can you explain this a bit further? Cheers, Jie On 28/02/2024 00:53, Sibi Sankar wrote: > Fix per-policy boost behavior by incorporating per-policy boost flag > in the policy->max calculation and setting the correct per-policy > boost_enabled value on devices that use cpufreq_enable_boost_support(). > > Logs reported-by Dietmar Eggemann [1]: > > [1] https://lore.kernel.org/lkml/265e5f2c-9b45-420f-89b1-44369aeb8418@arm.com/ > > Sibi Sankar (2): > cpufreq: Fix per-policy boost behavior on SoCs using > cpufreq_boost_set_sw > cpufreq: apple-soc: Align per-policy and global boost flags > > drivers/cpufreq/apple-soc-cpufreq.c | 1 + > drivers/cpufreq/cpufreq.c | 15 +++++++++------ > drivers/cpufreq/freq_table.c | 2 +- > 3 files changed, 11 insertions(+), 7 deletions(-) >