Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2626424imb; Mon, 4 Mar 2019 09:47:33 -0800 (PST) X-Google-Smtp-Source: APXvYqz9k0eDBSWOBfHc7BmoM5tI2Iln7pxQ+KPHUi7ZfJCPrnANZtDUc2mCpixCnGgoX10XZYib X-Received: by 2002:a17:902:4303:: with SMTP id i3mr3431795pld.152.1551721653791; Mon, 04 Mar 2019 09:47:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551721653; cv=none; d=google.com; s=arc-20160816; b=Zj3EQ9sL8yFDiUIub9qsp0m6m2wE3Pfng5OoYlBWu010kMsNQCfkZHbke56AR5RYFu Kh1Y+dXaU3zUGaHE/0i00nutvrdFH8Eu6Y48nIztCGwz2m+YeKC8Q+sS1ti+GQjVWWcw h/CSU/uG8dgyHrxCM7Bcx5xib5dcASZlWed90URZ0rmTTUq0T4qERd4UfnDOoDTALfra fiYIMBIzuWC2b/Kpe3zK3/xBEDkHAWPQ22fAY3gXN4D6qYPT62jUl4V1aOdWB8vOE8Tp tWU/2jcx2kPsfd5uylKINTgBDOIZSWif5t0viYwHElqliugJSquaCpjpgvcnG/Ah626A gD/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WjkeZwxCup1+yg1lF/mNax5f4q18OsjiaJGhTkD9zyo=; b=MR+NwN6hpbqVfaG1+h00UvCcJNZpngB8uf4iarIdY8FglDqf1vnc3hGKxiDKnANah/ +CqaxbIzVy5x9kl0Fr9XN+TEy6whG4lLlP7B1g2HqohUY4axM/d6SiUd9zmpx7x/8Cge tuDEqc91BkQpIl4PPdT5Pkdc8ASk4sVC7Om8XKvIJaUzey7HQSkqryXvDoTo2hUt/Ius WESxCZrjbldSfSFJTg3acEXC6iz5RmhxRl9jtAFmf+Bb4g0qdKwXBrakttM08C7w9+PR 6QW2EObzMVASik27JiLhqCeZxlsPxFiIhwd+brmQYtGpi5w2L0Hhrwx2lfGvsEg6QoR1 rP6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=f1cTu+zO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si5930321pll.83.2019.03.04.09.47.18; Mon, 04 Mar 2019 09:47:33 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=f1cTu+zO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727449AbfCDRo7 (ORCPT + 99 others); Mon, 4 Mar 2019 12:44:59 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:51668 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbfCDRo6 (ORCPT ); Mon, 4 Mar 2019 12:44:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WjkeZwxCup1+yg1lF/mNax5f4q18OsjiaJGhTkD9zyo=; b=f1cTu+zOlCXhs7ahpbfdooggW nbqdidWC2PUzz+3DIUv0LErO7+IRpWNrMYRNhcFQNsjNzOdjFOSzp+0Qvy3kzgzWi/M4hL+zypNa4 h/VkeDl32nPKSX6FNXvuq6RsKgXN3prCy1udp85zJYpkj/RywNIQ4UCuUu5cn/lDeLKa2TA1DFN1K XR11SYmq27qeOLttBYrLkiXRAjTIBlar1R9lGY7RUBi7WILFGC5DdWcWjRrN8goPbQEN8S3EIhlqJ 7mDUaW06B5yvRit0kP/fIaasxz6gD5P3Y2xaTpp7snBhhXPK6+5NAqz76sggBdGbdz756QpzMYsAu 7VsEfw09g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0re3-0004SO-3p; Mon, 04 Mar 2019 17:44:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7A53620288BA6; Mon, 4 Mar 2019 18:44:53 +0100 (CET) Date: Mon, 4 Mar 2019 18:44:53 +0100 From: Peter Zijlstra To: Quentin Perret Cc: =?utf-8?B?V2FuZywgVmluY2VudCAo546L5LqJKQ==?= , =?utf-8?B?WmhhbmcsIENodW55YW4gKOW8oOaYpeiJsyk=?= , Ingo Molnar , "linux-kernel@vger.kernel.org" , Chunyan Zhang , "Rafael J. Wysocki" Subject: Re: =?utf-8?B?562U5aSNOiBbUEFUQ0ggVjRdIHNj?= =?utf-8?Q?hed=2Fcpufreq=3A_initializ?= =?utf-8?Q?e?= iowait_boost_max and iowait_boost with cpu capacity Message-ID: <20190304174453.GV32534@hirez.programming.kicks-ass.net> References: <1550831866-32749-1-git-send-email-chunyan.zhang@unisoc.com> <20190222105957.wxhlcmoag5f3i4fi@queper01-lin> <9099990618e242e1bab77ce3f9d9b1e3@BJMBX02.spreadtrum.com> <20190304135810.rq2ojnbn5vezrab3@queper01-lin> <20190304152616.GM32494@hirez.programming.kicks-ass.net> <20190304164816.4fnxxesjwzdoqria@queper01-lin> <20190304174028.GO32494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190304174028.GO32494@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 04, 2019 at 06:40:28PM +0100, Peter Zijlstra wrote: > /* > * @util is already in capacity scale, convert iowait_boost > * into the same scale so we can compare. > */ > boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT; > util = max(boost, util); > return min(util, max); Ah, I don't think we need that last min in this case; both terms should already be <= SCHED_CAPACITY_SCALE.