Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2655147imb; Mon, 4 Mar 2019 10:32:01 -0800 (PST) X-Google-Smtp-Source: APXvYqwKeiOvCynWOiUEVt1YRa7TxRcw49vpBJw2gBVJ8pr3LAvaeosW9uxAk5YUiEXC56eJtnDa X-Received: by 2002:a17:902:7614:: with SMTP id k20mr21580278pll.298.1551724321904; Mon, 04 Mar 2019 10:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551724321; cv=none; d=google.com; s=arc-20160816; b=YQ+NBu/nR19NJb/3ozBZ9f1UxVDHWa/mdTUyHn/mKW7i99lxk3ljmgw3yloyFoMFkm VyYu1TSSGj91nugJpjtL3C/6Eg819kpYA23ss1oZGRW2tIB6gd5GKmvx9lA8Ve+OF4Iq SAGmiPf4UDOFJu19CqM9vIMqx1uT4cZvtzuCQqyk5KMvZ9qfwHW954BYzei5K8mqZmYR HIG9LVXGwxS9EPqkh0EhzmvphkIIdbQE5ulPqoDe84JUzX8Lvx4PB2TlekKswwcCz0Rb /Ydd7jbF5K94QksUnL2OwGzd1RY20vTLkMJJ9MpfUDJ0+uZQwact8sejd1CXuywBNCXs gAjw== 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=SA9232haIRmJODNUh4w9IqZ1KWBeRevlsEsRGvAriXY=; b=IVEPqlH6yJw5TGuEYPWBxwDG8YQNyx1mQI5E1/CI/d2V4t9MlCCcUeRmKKXwRtrF7X 3ehEh+3ASlihxc8nxfBDrTb+Sz7EQ2GNxUzFPX+DE1IAruYGI/uju6DwjSzrNNkf07nM /lQ5//2PVxCemoD3ykTb69H9trMhlbS7IiRFDcRU3NNr8+Mj7KBqHYgJMHUC/iJA8ERO SEhQCmAwdZcEYPd0ZjAPdr1W8G796greJDM/zaeg6GfZyznTstxlo5ScszPgdwHwliz8 x7oEiTVT5+gO9Brd9nd+cCFWfCQ7N3rBdhitMWoWf2878SmPnxo0K3uUDwBAksu/24Fc ZoyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iYANKdF1; 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 y142si6265405pfb.149.2019.03.04.10.31.46; Mon, 04 Mar 2019 10:32:01 -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=iYANKdF1; 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 S1727465AbfCDRt4 (ORCPT + 99 others); Mon, 4 Mar 2019 12:49:56 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:51814 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfCDRt4 (ORCPT ); Mon, 4 Mar 2019 12:49:56 -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=SA9232haIRmJODNUh4w9IqZ1KWBeRevlsEsRGvAriXY=; b=iYANKdF1OJXf8VyhCikkh0gbg 1VPNaxlvoxLWdKNPAytiyXvF2JTyVHoyOCYqQghRbmIW4oQC5mQrMaAOvkJmr/erFyv8okgmmZyEm fBytIF9mHmedmSgPcew1O3rCEdtIr4KlT4fojBOudsBE6/H0ANlbp2rAb/baiBpE4NdihPtfQnOL6 pX1+hM9YD9VgXMg8GCWPJQOBmvVApRw2Oa7lFAYhWnuhWzu6YH+W5dz3FrHf13eGrUGAAOL68cBsC Wwpvmxngoq2JE8URACBAggPLGNr7CYDq0CXJjfTE2EK+mCKAU5VSKRCuqK9s3KGzdBsMShg2HIIe5 vJh4kL5pQ==; 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 1h0rip-0006Ra-0a; Mon, 04 Mar 2019 17:49:51 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8216020288BA6; Mon, 4 Mar 2019 18:49:49 +0100 (CET) Date: Mon, 4 Mar 2019 18:49:49 +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: <20190304174949.GP32494@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190304164816.4fnxxesjwzdoqria@queper01-lin> 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 04:48:16PM +0000, Quentin Perret wrote: > On Monday 04 Mar 2019 at 16:26:16 (+0100), Peter Zijlstra wrote: > > On Mon, Mar 04, 2019 at 01:58:12PM +0000, Quentin Perret wrote: > > > You could also update the values in sugov_get_util() at the cost of a > > > small overhead to compute 'min'. I'm not sure what's preferable since > > > we wanted to avoid that kind of overhead in the first place ... > > > > Or,... we could actually make things simpler. > > > > How's the below? I have a feq questions wrt min, mostly: > > > > - what's the difference between policy->min and > > policy->cpuinfo.min_freq; it used to be the former, the below uses > > the latter. > > As mentioned on IRC, IIRC policy->min is something that can be written > from userspace (for example) to cap the min freq. OTOH, cpuinfo.min_freq > is read-only and just reports the lowest OPP. > > Rafael is this correct ? > > > - should we have a min_freq based value, instead of a constant; the > > difference being that with this the actual boost speed depends in the > > gap between min/max. > > If the above is correct, then I agree. Looking at min_freq simplifies > things quite a bit since it doesn't need to be updated all the time, > and the whole policy->min stuff is dealt with at the CPUFreq core level > so it's not obvious sugov should care. Using a constant value (my dice seem to like 128 for some reason) would result in the boost curve being independent of the available frequencies -- and thus the same for all machines. With that particular value, we need 9 consecutive IOWAIT wakeups to reach MAX, instead of some random number (7 for your juno r0).