From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFT][Update][PATCH 2/2] cpufreq: intel_pstate: Update max CPU frequency on global turbo changes Date: Thu, 7 Mar 2019 12:23:44 +0100 Message-ID: <20190307112344.GC32477@hirez.programming.kicks-ass.net> References: <9956076.F4luUDm1Dq@aspire.rjw.lan> <20190305104256.7kvedlttuovmptpc@queper01-lin> <2336151.IZk3Z8DVvP@aspire.rjw.lan> <6357319.Iupbu3ldGQ@aspire.rjw.lan> <20190305114406.GV32494@hirez.programming.kicks-ass.net> <20190305120040.y2vmnxrch6kgya3e@queper01-lin> <20190305173746.p32xolcpueudlzwn@queper01-lin> <20190307110256.padefvq4e52ly3nm@queper01-lin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190307110256.padefvq4e52ly3nm@queper01-lin> Sender: linux-kernel-owner@vger.kernel.org To: Quentin Perret Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , LKML , Viresh Kumar , Srinivas Pandruvada , Chen Yu , Gabriele Mazzotta List-Id: linux-pm@vger.kernel.org On Thu, Mar 07, 2019 at 11:02:58AM +0000, Quentin Perret wrote: > Also on recent big little SoCs, the capacity ratio can be pretty high. > You can get little CPUs with 300 of capacity or so. The arbitrary 128 > thing is basically gonna go near max freq in one step, although the CPUs > actually 20 available OPPs or so. And I guess that's a shame. Ah, but remember; with the latest patch the iowait_boost is scaled on max. So in order to hit that 300, you first have to hit 1024. + boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT; + return max(boost, util); So iowait_boost goes from 128 to 1024 in 4 wakeups (the first sets 128, the next 3 get it to 1024), but the effective value is, given @max == 300: 128 -> 37 256 -> 75 512 -> 150 1024 -> 300 so irrespective of the number of OPPs and their spread, it takes 4 wakeups to get to max.