Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2041183imm; Sun, 27 May 2018 23:58:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqrooCzVxVBhCpAREGMSGXV9gB2u5JOuBZ103Y9459xiGpEuUgCiAJ7sFnHX0gNzLRnI1Uw X-Received: by 2002:a17:902:758d:: with SMTP id j13-v6mr12619275pll.188.1527490697568; Sun, 27 May 2018 23:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527490697; cv=none; d=google.com; s=arc-20160816; b=zGX9PFzJZtLKaS8D3pVtVyAwRtJQezgw+/oji2PhqoIyxTgd1HBXE2GlCgjpQyhaVw nHngrh8FHWunZZ09195S702vmguLooxNdretMpoAS0vt1undzLhsqqvEa0Q3Y9xi4xki hioPqgic+8A4Ofbw8kQT4dl2f7DuvCgIaNY8fGzxcWjrer+mF5iHKTeXsCIb82NNgq21 sPqWDjCUXKwPB8ML9IesxUwa7hHiAfDrxv7zDqOSuTatNd8/dfdRjPtBN6wMLju9Y5l8 qEw+D1xAIIST9mBhpnydQi1sBkBa2CMOpDczlKXsi2vpeec+iFUrXKQnHCcVEARbSQld jJ9Q== 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 :in-reply-to:subject:cc:to:user-agent:organization:from:date :message-id:content-transfer-encoding:mime-version:dkim-signature :dkim-filter:arc-authentication-results; bh=pVM3DTCTV8bTAJUA6AlY+qUPYqVkggdZJAen/O9NN3U=; b=R0b5UocMa3Li5N8v1NnLtnSfmmDt4QTqWDjytW0cOMxsqG42c9vlBr6L+WBWrJkk8J Mwhsgv0qPjztd6Fkd2djtyjtqk+EEoRqR65zQrqyHsV3jUmtkINIZlFkbd74LYVsjRHg bDfm/o+Fu+uIzPGfsEeT5RKz6rFiy1VhAl/fIMeP2tsh1mKhwzpGREn7ESF+lIitZ6Rz jS18o+knoe8iHBnuTtViKlQMZBOThV1UZsl+hVA6ukSGBpEXiIk2wOyOce5oDjv2eBdx K3O/RxCYr35LN7mr5aFYSLfjJ5mslobqUMlFdDEPGl5DSDQDK3fzfgCcs5Kqs6SuJQx0 rOVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Ek7R8NqS; 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 24-v6si30122141pfp.161.2018.05.27.23.58.02; Sun, 27 May 2018 23:58:17 -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=Ek7R8NqS; 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 S1753576AbeE1G4r (ORCPT + 99 others); Mon, 28 May 2018 02:56:47 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:56880 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753544AbeE1G4p (ORCPT ); Mon, 28 May 2018 02:56:45 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180528065643epoutp034420f984d72a263b6131788e5095ea4d~yvJxQjlzu0098100981epoutp03Z; Mon, 28 May 2018 06:56:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180528065643epoutp034420f984d72a263b6131788e5095ea4d~yvJxQjlzu0098100981epoutp03Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527490603; bh=pVM3DTCTV8bTAJUA6AlY+qUPYqVkggdZJAen/O9NN3U=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=Ek7R8NqS8MfjVpzh7JKZkPDWFgInmAQ8zByCv3hh4S74L6Lu8RQGFvFMO8Qi75qMr GcMSURUYs9IPDEE7IDHEkG3u/pLaUdOGY7iPo92z4gfJhtv2PPoH9em2n2ei3YJ8Rh 8eUeda1SfwHkUG2zDyTvDRYau2gHFbSSKGBmtWhE= Received: from epsmges1p1.samsung.com (unknown [182.195.40.157]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180528065640epcas1p4b36ff528fa692e107a98abe0c0957804~yvJvCX7pw1840418404epcas1p4C; Mon, 28 May 2018 06:56:40 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 34.D0.04066.828AB0B5; Mon, 28 May 2018 15:56:40 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528065640epcas1p14d8921e00ea995c6c5e09952d57b1bff~yvJu1VqFW0994909949epcas1p1A; Mon, 28 May 2018 06:56:40 +0000 (GMT) X-AuditID: b6c32a35-b89ff70000000fe2-88-5b0ba8283d26 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 9F.1C.03915.828AB0B5; Mon, 28 May 2018 15:56:40 +0900 (KST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from [10.113.63.77] by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9F00AX6FAG5C20@mmp1.samsung.com>; Mon, 28 May 2018 15:56:40 +0900 (KST) Message-id: <5B0BA828.4070903@samsung.com> Date: Mon, 28 May 2018 15:56:40 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Matthias Kaehlcke , MyungJoo Ham Cc: Kyungmin Park , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Douglas Anderson Subject: Re: [PATCH 05/11] PM / devfreq: governors: Return device frequency limits instead of user limits In-reply-to: <20180525203043.249193-6-mka@chromium.org> X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUhTYRTHe3a3e+fa9GlmPhiZXYlUcHm3Nq/RIijiRgUjIUozu+htytwL u9My+rCKfOtdpcBqGmKlWeZ8yRSzdNmnDHuxKDLCWBahhFlaZN27W9Sn5//8z+8czjkcJaat wmOU+Q4P53awBSSukncOJOqSE67Oz0x581VH/6wcJGj/50kFXRsYUtAPL9/D6SP1LTj98PAn gn7SfQGnp04EAN3wfFhGT90cA/SrQ1dx+mhvgFinZpp9zYD58b0SMOe9w3LG31SOM30Xmwnm ZHsTYKb8sRYig1uTx7G5nDuOc+Q4c/MdVjO5OT17fbbRlEIlU2l0KhnnYO2cmdywxZK8Mb9A 6JSMK2ILCgXLwvI8uXLtGrez0MPF5Tl5j5nMpCi9jkpJ1en1wmvIWq03CsgeLq/0WhVwfYve P3h2WuYFjZEVIEyJ4CrUMPieELUWdgF052lCBVAJ+htAgWCT/C/0zl+FSYEegC42vgViQAMX oJmqUQFSKjG4FAUe20Qbg4moo6eFkPjXAM1VlsslPgl1NA7LRC2Hy9Fo4C0ualzw+8ZfhHQE XIaezYyF6kfBHeh27ddQdwthOqqbfSQXi2JwWoa6J2pDUCS0ofsfTilEHQZTUdu5NoUIIXiE EKoOKKQRNqC26rI/OhJ9fNBOiF0juBg9vm+W+FKASnt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QimCwTB6dUA+O2isdbjlf3G/59 OnXnpHc/Z5kFWm6dc0iWyWzPhTsqhtXBJtt6faTWTX/IfH/dTZ4EtZayBMt/zc4hoTlzHFVk kl45MKlut9+/Tuq6xIVruye5q6kfaPQ//3dd1ssZBs2/uRtSltcov4uZxaMkXbLd4s6VuXYH DzcIafAu+LjiZ83kdpEV9Y1KLMUZiYZazEXFiQC/9VN+lQIAAA== X-CMS-MailID: 20180528065640epcas1p14d8921e00ea995c6c5e09952d57b1bff X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203310epcas4p34b5ad54243a2e93c7e5bff019ac9e627 References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-6-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2018년 05월 26일 05:30, Matthias Kaehlcke wrote: > The performance, powersave and simpleondemand governors can return > df->min/max_freq, which are the user defined frequency limits. > update_devfreq() already takes care of adjusting the target frequency > with the user limits if necessary, therefore we can return > df->scaling_min/max_freq instead, which is the min/max frequency > supported by the device at a given time (depending on the > enabled/disabled OPPs) As you mentioned on the description, update_devfreq() adjusts the final target frequency. So, actually, there are no any benefits when changing from max_freq/min_freq to scaling_max/min_freq. I think that it is not necessary. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/devfreq/governor_performance.c | 2 +- > drivers/devfreq/governor_powersave.c | 2 +- > drivers/devfreq/governor_simpleondemand.c | 6 +++--- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/devfreq/governor_performance.c b/drivers/devfreq/governor_performance.c > index 1c990cb45098..a8e3478b3c43 100644 > --- a/drivers/devfreq/governor_performance.c > +++ b/drivers/devfreq/governor_performance.c > @@ -20,7 +20,7 @@ static int devfreq_performance_func(struct devfreq *df, > * target callback should be able to get floor value as > * said in devfreq.h > */ > - *freq = df->max_freq; > + *freq = df->scaling_max_freq; > return 0; > } > > diff --git a/drivers/devfreq/governor_powersave.c b/drivers/devfreq/governor_powersave.c > index 0c42f23249ef..8696efd32e5a 100644 > --- a/drivers/devfreq/governor_powersave.c > +++ b/drivers/devfreq/governor_powersave.c > @@ -20,7 +20,7 @@ static int devfreq_powersave_func(struct devfreq *df, > * target callback should be able to get ceiling value as > * said in devfreq.h > */ > - *freq = df->min_freq; > + *freq = df->scaling_min_freq; > return 0; > } > > diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c > index 3da7554b4837..805fee09c754 100644 > --- a/drivers/devfreq/governor_simpleondemand.c > +++ b/drivers/devfreq/governor_simpleondemand.c > @@ -46,7 +46,7 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > > /* Assume MAX if it is going to be divided by zero */ > if (stat->total_time == 0) { > - *freq = df->max_freq; > + *freq = df->scaling_max_freq; > return 0; > } > > @@ -59,13 +59,13 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > /* Set MAX if it's busy enough */ > if (stat->busy_time * 100 > > stat->total_time * dfso_upthreshold) { > - *freq = df->max_freq; > + *freq = df->scaling_max_freq; > return 0; > } > > /* Set MAX if we do not know the initial frequency */ > if (stat->current_frequency == 0) { > - *freq = df->max_freq; > + *freq = df->scaling_max_freq; > return 0; > } > > -- Best Regards, Chanwoo Choi Samsung Electronics