Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3859482rwb; Tue, 16 Aug 2022 09:55:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR4JIGq9odchRyaAU4NYIktPLiydWrczW/RZfnAezO+EzyTsJSpj3/MDYwcrJ28nk0BSiL63 X-Received: by 2002:a17:902:ce84:b0:170:874f:f6b2 with SMTP id f4-20020a170902ce8400b00170874ff6b2mr22317014plg.51.1660668921541; Tue, 16 Aug 2022 09:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660668921; cv=none; d=google.com; s=arc-20160816; b=NOlSGrbZdcZ4kg/nR+O8TklJ7Yi8mws/ZPjm5II6oF2HQrbnPYDV4xHyVaExo2uwP1 fKCwbHT3/xYMzpLQl+FxChEIJ/KI2nmdN00Z/hYwABLvHdASDn7Cxs2boFvWY+vUrVU7 WDI7TbgwfCBMj0tFWgqGT1NItggrGFNqbnUnNalEOjuTV8GMgTNhbQpnBoXSXtnfJV6g MKvV6yjybGrCOXodVS78rrZfaiHsQ6xrDRKU2pYVHsRRceQv0SdVoMnmkS4Z/8yVRdrd Of/GxBZzdlSyN62LGempt6o3edi5LYIfaOAK+c4BSQtm5HaIhj2vue9KeijMG3tyf1Nm UGkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=G75P1MnBlTsTHdbk47o07Tr2GO1weW34E0V486dZ6zQ=; b=pC9U0MZaDmeDiuuL6h4FioXaa0m+hEA2dGI1VrRNtHVE96p0nyPn0y+DFi//Avs9gu 1Fd5tAeJYYv4TYx9M0hFcQhMT9My5E5kRpRZ0lOxc1qDwmhB/leJbcbShWTeAiqlkoPk eyLu3Gr33mj0JN/M01/O4fUv+POhJaJF4+pob6PFvOVcyyeJ9QSosxlf8wD9AvLvcXGg OlSfoNth2eYhkMBNlMQW5vNVOWvqNF4Jqfdw7UexCb4FHTeKtAj6ZpF9firwImW4t0lW V2uXeLS+NR62H3JS8363b9os6oRZ4vvNGdAxUVV3owJ6JorJlPhTRK0qEgMSJsk9ldyc VWRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=tyvhRkLn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e24-20020a631e18000000b004218416eab5si13756425pge.463.2022.08.16.09.55.10; Tue, 16 Aug 2022 09:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=tyvhRkLn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234340AbiHPQFS (ORCPT + 99 others); Tue, 16 Aug 2022 12:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236289AbiHPQEe (ORCPT ); Tue, 16 Aug 2022 12:04:34 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB961B1D for ; Tue, 16 Aug 2022 09:03:17 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id bu15so4676164wrb.7 for ; Tue, 16 Aug 2022 09:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=G75P1MnBlTsTHdbk47o07Tr2GO1weW34E0V486dZ6zQ=; b=tyvhRkLnT9eQhPU1fA+R37bcZOcR1lj7033nZZYaHV0lalSjYk16myN81RvmFzEdMC ndbWIqX+3WeqaBeA4NYeiFOOZplsWmWVG0eBlinEroNkv6X42hD+OZDgFfIEM4+D8HHD jSBOg9RNYMjSTCVrPWaO51iBtkm4g6kvHMAvaboPSNjUjSUQppwDWKdo0SOc5ZvywH3a wdIkH7/7oG1wUDHRaCoQkUtwjPuA7EqYTuXWezQTRwsFT3XlB2A0Sl44lhrlkRDchgsU km96AAvMAwoVwbguS/wwzFqyDDP7ykeHS0+J50yUk0jwdDc04LdcT9/4QOpcIJt9h7Ni Le3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=G75P1MnBlTsTHdbk47o07Tr2GO1weW34E0V486dZ6zQ=; b=ZBDv6HgaHPfO4DDiAPrCGscS6mrDlRVbNNktdIGwyaOsSw58L4NArysHsJiDskqBv6 gD17xi4DOh0KOGetpjFbbQnfxY/3LzwJpSK+HLpYkUgOFT3CQOox4rh6aygHb57C9E5G XqhUt+K32PED1U1FA2AtqKF8iwF28LykVQU+wbRPHX29X213HgTXld3zV5UXo9iVY6EE mMk2kkceIAmHy+ye50yiXfD5yfnPkd8DPgyXJrPAcR4xjXt2on8T4dnZpncCuc1mbeMz 1wJG3kX3pJMNPS6VZWYt6m3K2Nq3QA3ViCg2H2/47+jHZ3F1WvBZa1dxJ0dLisBOfUJl IoVQ== X-Gm-Message-State: ACgBeo3PlIekcbUTombgY9oimddREC8CCR2+hxAih5UDRm5F3PfKV5/d 1FJtuLgor5vDtJwI7NBuafpIAg== X-Received: by 2002:a05:6000:82:b0:225:21ff:a389 with SMTP id m2-20020a056000008200b0022521ffa389mr76896wrx.22.1660665795549; Tue, 16 Aug 2022 09:03:15 -0700 (PDT) Received: from localhost ([109.180.234.208]) by smtp.gmail.com with ESMTPSA id z3-20020a1cf403000000b003a60bc8ae8fsm1897992wma.21.2022.08.16.09.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 09:03:15 -0700 (PDT) From: Punit Agrawal To: "Yuan, Perry" Cc: Punit Agrawal , "rafael.j.wysocki@intel.com" , "Huang, Ray" , "viresh.kumar@linaro.org" , "Sharma, Deepak" , "Limonciello, Mario" , "Fontenot, Nathan" , "Deucher, Alexander" , "Su, Jinzhou (Joe)" , "Huang, Shimmer" , "Du, Xiaojian" , "Meng, Li (Jassmine)" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 6/7] cpufreq: amd-pstate: update pstate frequency transition delay time References: <20220814163548.326686-1-Perry.Yuan@amd.com> <20220814163548.326686-7-Perry.Yuan@amd.com> <87bkslim2c.fsf@stealth> Date: Tue, 16 Aug 2022 17:03:13 +0100 In-Reply-To: (Perry Yuan's message of "Tue, 16 Aug 2022 07:02:27 +0000") Message-ID: <874jycfa66.fsf@stealth> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Perry, "Yuan, Perry" writes: > [AMD Official Use Only - General] > > Hi Punit > >> -----Original Message----- >> From: Punit Agrawal >> Sent: Monday, August 15, 2022 11:06 PM >> To: Yuan, Perry >> Cc: rafael.j.wysocki@intel.com; Huang, Ray ; >> viresh.kumar@linaro.org; Sharma, Deepak ; >> Limonciello, Mario ; Fontenot, Nathan >> ; Deucher, Alexander >> ; Su, Jinzhou (Joe) ; >> Huang, Shimmer ; Du, Xiaojian >> ; Meng, Li (Jassmine) ; linux- >> pm@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: Re: [PATCH v5 6/7] cpufreq: amd-pstate: update pstate frequency >> transition delay time >> >> [CAUTION: External Email] >> >> Perry Yuan writes: >> >> > Change the default transition latency to be 20ms that is more >> > reasonable transition delay for AMD processors in non-EPP driver mode. >> > >> > Update transition delay time to 1ms, in the AMD CPU autonomous mode >> > and non-autonomous mode, CPPC firmware will decide frequency at 1ms >> > timescale based on the workload utilization. >> > >> > Acked-by: Viresh Kumar >> > Signed-off-by: Perry Yuan >> > --- >> > drivers/cpufreq/amd-pstate.c | 4 ++-- >> > 1 file changed, 2 insertions(+), 2 deletions(-) >> > >> > diff --git a/drivers/cpufreq/amd-pstate.c >> > b/drivers/cpufreq/amd-pstate.c index e40177d14310..9cb051d61422 100644 >> > --- a/drivers/cpufreq/amd-pstate.c >> > +++ b/drivers/cpufreq/amd-pstate.c >> > @@ -41,8 +41,8 @@ >> > #include >> > #include "amd-pstate-trace.h" >> > >> > -#define AMD_PSTATE_TRANSITION_LATENCY 0x20000 >> > -#define AMD_PSTATE_TRANSITION_DELAY 500 >> > +#define AMD_PSTATE_TRANSITION_LATENCY 20000 >> > +#define AMD_PSTATE_TRANSITION_DELAY 1000 >> >> How were these values derived? If from documentation, it'll be good to add a >> link to the relevant documentation. And if they were derived from testing, >> please mention this in the commit log (along with some details of the tests used >> to determine the value). > > The values are calculated from the CPU PM firmware and hardware design. > There are some latency and delay values defined in the PM firmware, I have no documents about the detail for now. In that case, please mention that the values are calculated from firmware / hardware design in the commit log (and include a reference to the firmware sources if available). Thanks! [...]