From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755274AbeAJIz5 (ORCPT + 1 other); Wed, 10 Jan 2018 03:55:57 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49194 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754093AbeAJIzz (ORCPT ); Wed, 10 Jan 2018 03:55:55 -0500 Date: Wed, 10 Jan 2018 14:25:45 +0530 From: Gautham R Shenoy To: Balbir Singh Cc: "Rafael J. Wysocki" , Gautham R Shenoy , Shilpasri G Bhat , Viresh Kumar , Abhishek , Akshay Adiga , Michael Ellerman , Vaidyanathan Srinivasan , linux-pm@vger.kernel.org, "linux-kernel@vger.kernel.org" , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" Subject: Re: [v3 PATCH 2/3] powernv-cpufreq: Fix pstate_to_idx() to handle non-continguous pstates Reply-To: ego@linux.vnet.ibm.com References: <1513148261-21097-1-git-send-email-ego@linux.vnet.ibm.com> <20171218083820.GA28881@in.ibm.com> <3110289.BbUpyYVBQa@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 18011008-0024-0000-0000-000017C527A1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008351; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000245; SDB=6.00972889; UDB=6.00492907; IPR=6.00752839; BA=6.00005771; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018955; XFM=3.00000015; UTC=2018-01-10 08:55:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011008-0025-0000-0000-00004E3AB718 Message-Id: <20180110085545.GA13666@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-10_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801100126 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Rafael, On Wed, Jan 03, 2018 at 11:47:58PM +1100, Balbir Singh wrote: > On Wed, Jan 3, 2018 at 11:07 PM, Rafael J. Wysocki wrote: > > On Monday, December 18, 2017 9:38:20 AM CET Gautham R Shenoy wrote: > >> Hi Balbir, > >> > >> On Sun, Dec 17, 2017 at 02:15:25PM +1100, Balbir Singh wrote: > >> > On Wed, Dec 13, 2017 at 5:57 PM, Gautham R. Shenoy > >> > wrote: > >> > > From: "Gautham R. Shenoy" > >> > > > >> > > The code in powernv-cpufreq, makes the following two assumptions which > >> > > are not guaranteed by the device-tree bindings: > >> > > > >> > > 1) Pstate ids are continguous: This is used in pstate_to_idx() to > >> > > obtain the reverse map from a pstate to it's corresponding > >> > > entry into the cpufreq frequency table. > >> > > > >> > > 2) Every Pstate should always lie between the max and the min > >> > > pstates that are explicitly reported in the device tree: This > >> > > is used to determine whether a pstate reported by the PMSR is > >> > > out of bounds. > >> > > > >> > > Both these assumptions are unwarranted and can change on future > >> > > platforms. > >> > > >> > While this is a good thing, I wonder if it is worth the complexity. Pstates > >> > are contiguous because they define transitions in incremental value > >> > of change in frequency and I can't see how this can be broken in the > >> > future? > >> > >> In the future, we can have the OPAL firmware give us a smaller set of > >> pstates instead of expose every one of them. As it stands today, for > >> most of the workloads, we will need at best 20-30 pstates and not > >> beyond that. > > > > I'm not sure about the status here. > > > > Is this good to go as is or is it going to be updated? > > > > I have no major objections, except some of the added complexity, but > Gautham makes a point that this is refactoring for the future I have tested this across POWER8 and POWER9. The additional complexity introduced by the second patch is required for the future when we are going to reduce the number of pstates. > > Balbir Singh. > -- Thanks and Regards gautham.