Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp142906ybb; Thu, 2 Apr 2020 23:12:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKHruf5Bd+9k5xTOtCZyh0GdKJIXFSOahxyjWHrHzcaR2zkdc/QqyI29IHszZW/BMGkZe85 X-Received: by 2002:a05:6830:1159:: with SMTP id x25mr5454977otq.110.1585894369243; Thu, 02 Apr 2020 23:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585894369; cv=none; d=google.com; s=arc-20160816; b=hzDrWOWVmNXG7blbg3UljBgGG+oCmpT82FTeAHXInVDEP4huZNnrHP9L0jbOe6OZ85 WRhZKt3XUD87U1ErH8L1MdKoH88NdZB5gwre+prqvCbrhFS+qY6ceNLveQdMgFD/s0zM jJijEO7G3hLUIWhTXQxrpHtgYUWwR03veNYONUYe2ngnv9yvh02sBUXmQbqU05nQWn5H RjYalmw8ECQPWofWuURHhmKIhQfRc5Jriw+LD4qfvlnV0Oq6NgA9FeGEyAA1jP8qXu0x mpWDxjNVNWFImjxeJXtxUtVtyPWgiFRxSEkwAlHw3ChSv9F9Ci6IuxGswW+6qSVAINmM oFCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=fZCfQRHeOXh0nkC8yiqwSIyweIhypVCIQ+CoI9WIkO4=; b=JvHbcSiV1PQOt3MKoR8DemgmrhtrSCDt6dlXS8OXdmOxjI8RyXfsTyAUPYd3gbRBkk RPOF+Ou2z4RzZr4yb4GwhgTIlQjw/S6rVz9QQukk+uh5AC/hBKyaiCC13CeGaCgKOuZz P20WHrUdrkyHTNYNUWUP6lcRAc3MOW7YBbG4kEXNP9ab0/2Ghn1WcbdP66CmEnc+9TYd NpEBIAm2XD6zNqxFvpn4icRGC4JOzH3qGokTSy+7h9NGPS0lXGjnD/NLy9zVJv1hIIUo 4FoO9YGrlAyGztLzKSe9EyGbLdAglmVkuualofq+uaMvWR3PmTSmh0iDOagFPOTFHhGO PT6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BhvjXEz0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si3249306otr.174.2020.04.02.23.12.36; Thu, 02 Apr 2020 23:12:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BhvjXEz0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732595AbgDCGMH (ORCPT + 99 others); Fri, 3 Apr 2020 02:12:07 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:33380 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730550AbgDCGMH (ORCPT ); Fri, 3 Apr 2020 02:12:07 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200403061203epoutp044a9c9710b5ec3727dfa0918aae04ef14~COnwohUDD2595425954epoutp04c for ; Fri, 3 Apr 2020 06:12:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200403061203epoutp044a9c9710b5ec3727dfa0918aae04ef14~COnwohUDD2595425954epoutp04c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585894323; bh=fZCfQRHeOXh0nkC8yiqwSIyweIhypVCIQ+CoI9WIkO4=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=BhvjXEz0BSR236XY52+1VEJHo9ScPcGcHCCM2XGLkCTCe2JvthoUkLNsfhL6h3GFs XxetqxDgzL+pk97r55UOnbEJincvE23uua2qGw9lBPIn5dxOA9xOIWduzdMtCkQX3T p1UhanlZ0CfFsVjzYdSms4eQnTmG2Y2Yzg6n7wAU= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200403061203epcas1p28c033be108a180aa8f5efcdc3755cbc1~COnwIHJ2z2668526685epcas1p2d; Fri, 3 Apr 2020 06:12:03 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.40.158]) by epsnrtp3.localdomain (Postfix) with ESMTP id 48tqMh4lcfzMqYkf; Fri, 3 Apr 2020 06:12:00 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 05.52.04648.8A3D68E5; Fri, 3 Apr 2020 15:11:52 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20200403061152epcas1p30223ef1f198ea55f229afda8fb351ed3~COnmFA30b1198911989epcas1p3S; Fri, 3 Apr 2020 06:11:52 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200403061152epsmtrp23b7eda0cb9f8ceb29bd34619544b8df4~COnmEM1ez2852328523epsmtrp2I; Fri, 3 Apr 2020 06:11:52 +0000 (GMT) X-AuditID: b6c32a37-1f3ff70000001228-92-5e86d3a85d7b Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id DC.E8.04024.8A3D68E5; Fri, 3 Apr 2020 15:11:52 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200403061152epsmtip2fd88b0f89267b299cdbf311c83b65f1d~COnl1pMdN0914109141epsmtip2M; Fri, 3 Apr 2020 06:11:52 +0000 (GMT) Subject: Re: [PATCH v2] PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting To: Dmitry Osipenko , Thierry Reding , MyungJoo Ham , Kyungmin Park , Jonathan Hunter Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <705e0c78-30ef-978d-c63d-b6dc90e6e5e4@samsung.com> Date: Fri, 3 Apr 2020 15:20:55 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20200402222448.8320-1-digetx@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOJsWRmVeSWpSXmKPExsWy7bCmru6Ky21xBifmW1is/viY0aJl1iIW i7NNb9gtLu+aw2bxufcIo0Xnl1lsFrcbV7BZ/Nw1j8WBw2PnrLvsHr3N79g8+rasYvT4vEku gCUq2yYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH6Awl hbLEnFKgUEBicbGSvp1NUX5pSapCRn5xia1SakFKToFlgV5xYm5xaV66XnJ+rpWhgYGRKVBh QnbG3tfT2AsO8VbsWfiesYHxF1cXIyeHhICJxJ0pb1i6GLk4hAR2MEo8e9DNCOF8YpS4v2QD G4TzjVFi/Z1pjDAtu2YsZIJI7GWUuLLvADuE855R4viSuWBVwgIpEr2rNrOCJEQELjNKLF30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ICYRI7lzxmgqgRlDg58wlYnFPAVOLUno1Qy9Ql/sy7xAxhi0vcejKfCcKWl9j+ dg7zBEbhWUjaZyFpmYWkZRaSlgWMLKsYJVMLinPTc4sNCwzzUsv1ihNzi0vz0vWS83M3MYLj SUtzB+PlJfGHGAU4GJV4eBkOtsYJsSaWFVfmHmKU4GBWEuF1nAEU4k1JrKxKLcqPLyrNSS0+ xCjNwaIkzvs071ikkEB6YklqdmpqQWoRTJaJg1OqgXHakfpv3ktOZL6b3nNy5rPN+SeeGPbO NXJVbDVcIa3U80QuraPER3PjfUezyd/U1y5R062fdiZfoEO4LEPuduCDXYEn+Ko67NLchE8Y J0y9Xr/u0NvCMN2a53rZXmnzdHcoGBiHL2d84L9wz7NDvhwvPn37c09Nb1OCZ4jI0m03zJpz HMIXyymxFGckGmoxFxUnAgAoDPjnowIAAA== X-CMS-MailID: 20200403061152epcas1p30223ef1f198ea55f229afda8fb351ed3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200402222645epcas1p499a7ebecb0dcd60a7b2e5960790de4e9 References: <20200402222448.8320-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/3/20 7:24 AM, Dmitry Osipenko wrote: > We're taking into account both HW memory-accesses + CPU activity based on > current CPU's frequency. For memory-accesses there is a kind of hysteresis > in a form of "boosting" which is managed by the tegra30-devfreq driver. > If current HW memory activity is higher than activity judged based of the > CPU's frequency, then there is no need to schedule cpufreq_update_work > because the result of the work will be a NO-OP. And thus, > tegra_actmon_cpufreq_contribution() should return 0, meaning that at the > moment CPU frequency doesn't contribute anything to the final decision > about required memory clock rate. > > Signed-off-by: Dmitry Osipenko > --- > > Changelog: > > v2: - Made commit's message more detailed, which was requested by Chanwoo Choi > in the review comment to v1. > > - This patch is now made to be standalone because there are no dependencies > in regards to this change. > > drivers/devfreq/tegra30-devfreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c > index 28b2c7ca416e..dfc3ac93c584 100644 > --- a/drivers/devfreq/tegra30-devfreq.c > +++ b/drivers/devfreq/tegra30-devfreq.c > @@ -420,7 +420,7 @@ tegra_actmon_cpufreq_contribution(struct tegra_devfreq *tegra, > > static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq); > > - if (dev_freq >= static_cpu_emc_freq) > + if (dev_freq + actmon_dev->boost_freq >= static_cpu_emc_freq) > return 0; > > return static_cpu_emc_freq; > Applied it. Thanks. -- Best Regards, Chanwoo Choi Samsung Electronics