Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1991417imm; Sun, 27 May 2018 22:38:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPEEQABkukrgxjIPV6pFeSYrVdrsQUARjXaQHy9CvR2KFilivpIpXKuhUGsvmKxRF+XAQJ X-Received: by 2002:a17:902:543:: with SMTP id 61-v6mr12314330plf.47.1527485893495; Sun, 27 May 2018 22:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527485893; cv=none; d=google.com; s=arc-20160816; b=vES9LrnjMaEhjKGR6t8XAeoLGqRvlzWbMytzz0Jza5ETho5fUucPO2RVgkCIuMc/Lo Kw/1wU3sYCKNUhY7tNQSOSr7kdMbYS6erOH/2gwKh/FM6Z5AOfynzE8yUsAtolSV6gnR nCkLhw5gEGrLT2e2UpqyjANVLS0yf+XKR6XIxp9OwTMJm5R3tZjyrd+olziBS6Qg5I45 ASmJQsHSboLImu1Krw/dEmwlh78H3LqjrV7/zOkTIf+OG/Y1xpSe69scRBC8pZRlpXmn 4ppQy0AwB7DBuTXlb4x6luY/ojUSGaqdPsWg7qPiwCJwIf9hXt2LwwkT/WrRoGxPyTFM LVug== 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=TH/CEB7p6GpjSGls0Wkbj/oAo5sqAiUTXVR7gWgwRwA=; b=gadka5XT7wX6iyCLuYnAoLvAZXVTWVTACIWc3ev4RNCjwaq2kD2eFVc8P0przLjZiw J4knCVBRr1TYlFIPG5evoVweBQsRsGoFud7gl9pejvfi/UH2P+it4geZ84Z0Jqhcvw4V Tr9BpeL15fz+xTp8AWlOQ5G5gIZPTS5yw/9nDwf4/nEs3RbWqJnDeMFZ7gTWlck9Gb6A BGbNsq0F+TlscZ+Y1PrSuC8ut4FvOHpLcRwcXQ2jG5DTpKI/64KDoky3tK1M8OTXtbUZ 5twmD7ZgQd1W03p3+pWO4X01iKXUFJLYDvsFEfrsMyteq9f0cnDeSM2hL+Vk/O2d9GsT mejQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WBZvD0X1; 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 w10-v6si2022477ply.482.2018.05.27.22.37.57; Sun, 27 May 2018 22:38:13 -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=WBZvD0X1; 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 S1753265AbeE1FgO (ORCPT + 99 others); Mon, 28 May 2018 01:36:14 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:61087 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751832AbeE1FgL (ORCPT ); Mon, 28 May 2018 01:36:11 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180528053609epoutp037ff736876c5f81d083f171cbe0a5e04f~yuDbzmwwY0476804768epoutp03Q; Mon, 28 May 2018 05:36:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180528053609epoutp037ff736876c5f81d083f171cbe0a5e04f~yuDbzmwwY0476804768epoutp03Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527485769; bh=TH/CEB7p6GpjSGls0Wkbj/oAo5sqAiUTXVR7gWgwRwA=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=WBZvD0X141EQ29wKKKl4B6R0ly42Y9gD/iuYFudPQsX0mkOEz2nLUA93TlHNgU8M8 YFuYKuudrT6BzhtTFLNrKt2lzOKsOLbiMuR2SKgLR8t0XzITwkCgDwme8jBXHttBTX GzdVC1Q+CQ7a/3fHTIgL2PGe1BnYtI4p1S7sFiAg= Received: from epsmges1p4.samsung.com (unknown [182.195.40.152]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180528053607epcas1p4b764d14822311c7b5915c3d9ac2a5f95~yuDZvm4Y50971209712epcas1p4M; Mon, 28 May 2018 05:36:07 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id D4.AA.04343.7459B0B5; Mon, 28 May 2018 14:36:07 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180528053607epcas1p4c69b17413f78614d6187257f11e87b3a~yuDZiauai0533605336epcas1p4x; Mon, 28 May 2018 05:36:07 +0000 (GMT) X-AuditID: b6c32a38-bd9359c0000010f7-5d-5b0b954731d3 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4C.29.03915.7459B0B5; Mon, 28 May 2018 14:36:07 +0900 (KST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from [10.113.63.77] by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9F0070RBK62Z10@mmp2.samsung.com>; Mon, 28 May 2018 14:36:07 +0900 (KST) Message-id: <5B0B9546.7070101@samsung.com> Date: Mon, 28 May 2018 14:36:06 +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 04/11] PM / devfreq: Remove redundant frequency adjustment from governors In-reply-to: <20180525203043.249193-5-mka@chromium.org> X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTURzHObvbvVfb7LjMDka1Lhload7N6Sk0gqIGBUkmhFbrppfNxx7s zugBMXtorgdWFmSPKb1kScrItKxGtlYEM7XM6CGUEGVlhdmTHne7Sv11vuf7+/zg+/vxown1 YTKBLrY6eYeVK2PIaPnlW0lpKcuOTChI6/ujwb8OBSns+/RBgT2BLgUOnbtJ4p2nm0kc2vGO wg+uniDxyP4AwGf7e2R4pGUQ4KcVjSTefT1ALVIamk41AcPPH4eA4birR27weatJg/9kE2U4 cMkLDCO+6TlUPp9l5rki3qHhrYW2omKrKZtZnmtcbNRnpLEp7HycyWisnIXPZpasyElZWlwm JmU0m7iyctHK4QSBmbcwy2Erd/Ias01wZjMFLKtNZdMyU7Va8dWtW6DVi8gG3jx65a7C3hm7 2e3vAS5wJsYNomgE09Gzz6NyN4im1bAdoK62EBEuqOFXgNyNs8ahQKiblKAWEXrXLAsXVDAW fTs8IHbTNAFnoEBvadgmYBJq7WimJP45QF+87jE+GQX9t8mwlsNEFNz1KOKTou9//TjiT4Qz Ud+3QRDWk+EadMXzhQrrOJiL6r/fjyQl4KgMXR32RKBJ0IhCvwYiOgpmopEGbyQpgjspdPFp r0IaYQl639Ytl/QkNHTnEhVOjeBU1Hs7W+KrAKq6foqQPr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BZJk4OKUaGNu87kq62PKt 3tm/Z51h3nr3V9N+Hp26/lPRmpXWDzp8fT5M4H+25mt8YnfEp232OuLTw/wNTtpd9W/lmSb0 lGX999nbehKkVU3P7773USfFubL2nEbV4yAxi5uz6m/a66vyzuy9vJrfneOzXonPBrnW+U+S Y/6/Wx90eIGyuvQ1saDMlZ7nzZVYijMSDbWYi4oTAWIkci6UAgAA X-CMS-MailID: 20180528053607epcas1p4c69b17413f78614d6187257f11e87b3a X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203333epcas1p230489fbae43296516f3febb327dcdeca References: <20180525203043.249193-1-mka@chromium.org> <20180525203043.249193-5-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 userspace and simpleondemand governor determine a target frequency and > then adjust it according to the df->min/max_freq limits that might have > been set by user space. This adjustment is redundant, it is done in > update_devfreq() for any governor, right after returning from > governor->get_target_freq(). > > Signed-off-by: Matthias Kaehlcke > --- > drivers/devfreq/governor_simpleondemand.c | 5 ----- > drivers/devfreq/governor_userspace.c | 16 ++++------------ > 2 files changed, 4 insertions(+), 17 deletions(-) > > diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c > index 278964783fa6..3da7554b4837 100644 > --- a/drivers/devfreq/governor_simpleondemand.c > +++ b/drivers/devfreq/governor_simpleondemand.c > @@ -84,11 +84,6 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, > b = div_u64(b, (dfso_upthreshold - dfso_downdifferential / 2)); > *freq = (unsigned long) b; > > - if (df->min_freq && *freq < df->min_freq) > - *freq = df->min_freq; > - if (df->max_freq && *freq > df->max_freq) > - *freq = df->max_freq; > - > return 0; > } > > diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c > index 080607c3f34d..378d84c011df 100644 > --- a/drivers/devfreq/governor_userspace.c > +++ b/drivers/devfreq/governor_userspace.c > @@ -26,19 +26,11 @@ static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) > { > struct userspace_data *data = df->data; > > - if (data->valid) { > - unsigned long adjusted_freq = data->user_frequency; > - > - if (df->max_freq && adjusted_freq > df->max_freq) > - adjusted_freq = df->max_freq; > - > - if (df->min_freq && adjusted_freq < df->min_freq) > - adjusted_freq = df->min_freq; > - > - *freq = adjusted_freq; > - } else { > + if (data->valid) > + *freq = data->user_frequency; > + else > *freq = df->previous_freq; /* No user freq specified yet */ > - } > + > return 0; > } > > Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics