Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2464397imb; Mon, 4 Mar 2019 05:58:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw9ZN8efbg0WLyb0e7F3L3N1lFEIXZ2M6Ly7E/KE/ktt57fj88dWKOmyXC/Sq4EAxsWDPnd X-Received: by 2002:a17:902:3143:: with SMTP id w61mr21006599plb.253.1551707934132; Mon, 04 Mar 2019 05:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551707934; cv=none; d=google.com; s=arc-20160816; b=Sxo6myCz6nHZt83bLhhGbVmeacuYxA4DbXKaXYmuW0hssHG70oWCdWiVc+rX0hsNvw QUC/elt7UOg8Gn3mtqPmPIOfv7O+YRvHi0PllMwSee8Yn+kW8PyKUmDhM1g8vyLxWHpH rHnYwuCEQ9dl3xx07Mj3ahb16eQLKrJE66sy2XxT0AHGPQD6gAg6uwY3gxXrbICsBSUy dmatXd57CVFFwFlYp2LFA6rbnJ/9tbXQPEN0d5cPl8BF2k7O0904qbH2Jpzs9o9W1Mgj WEMytChWN5wZM61nRJkHMR0BogyMf7K4Vwga7nX4vlbF9tTrq/ezxM8SEHAAW/vVgJp7 c+UQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=7w8Z2aMgEuCmuV/omsJ5wO/ptD5O4cx5W2nKAA2aj+I=; b=1FH12TjSc4f8z7BlgU5cLnYED4EkAyYyCm/xKuwzy0wgkmAZpqO/kblJvaUWte+z9X F3yc+g9XT7mmzx7fAEfQoDeeTzeiF3k+nuA7GzARyH/lTYVENMU7VfSoaxgfEXPNc2gV +tB/UddLs7C194F9lIj1XdWdatfEWfHs4TDPa+Eo2JGizTQaFaDLqvbijMEIuVfh9wO3 DaVEJ3wF+ij+5xQnAiBEmYGlezA6FpjtxMGPFQdLiMYKFb8/DhA6UsyjLys4PPBVrnt9 2k8U6SHqoHmbvWsB14+w/yBcKLp8fKgLesPpw62H1rxWseDiHHk/9Boz8t9Smf83yYe1 F01g== ARC-Authentication-Results: i=1; mx.google.com; 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 b23si5222758pfd.182.2019.03.04.05.58.38; Mon, 04 Mar 2019 05:58:54 -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; 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 S1726442AbfCDN6Q (ORCPT + 99 others); Mon, 4 Mar 2019 08:58:16 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33974 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbfCDN6Q (ORCPT ); Mon, 4 Mar 2019 08:58:16 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AFCF8EBD; Mon, 4 Mar 2019 05:58:15 -0800 (PST) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7BADB3F575; Mon, 4 Mar 2019 05:58:14 -0800 (PST) Date: Mon, 4 Mar 2019 13:58:12 +0000 From: Quentin Perret To: =?utf-8?B?V2FuZywgVmluY2VudCAo546L5LqJKQ==?= Cc: =?utf-8?B?WmhhbmcsIENodW55YW4gKOW8oOaYpeiJsyk=?= , Ingo Molnar , Peter Zijlstra , "linux-kernel@vger.kernel.org" , Chunyan Zhang 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: <20190304135810.rq2ojnbn5vezrab3@queper01-lin> References: <1550831866-32749-1-git-send-email-chunyan.zhang@unisoc.com> <20190222105957.wxhlcmoag5f3i4fi@queper01-lin> <9099990618e242e1bab77ce3f9d9b1e3@BJMBX02.spreadtrum.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9099990618e242e1bab77ce3f9d9b1e3@BJMBX02.spreadtrum.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 04 Mar 2019 at 07:35:04 (+0000), Wang, Vincent (王争) wrote: > Did you mean the value of arch_scale_cpu_capacity() is changed in > cpu_capacity_store()? Yes, there's that, but more importantly topology_normalize_cpu_scale() is called during boot. With printks() in the relevant functions, the boot log on my system with two CPUFreq policies looks like this: [ 2.393085] init_cpu_capacity_callback: policy0 [ 2.397714] sugov_start: policy0 [ 2.403734] init_cpu_capacity_callback: policy1 [ 2.407901] topology_normalize_cpu_scale: done [ 2.412581] sugov_start: policy1 So, the lack of order of sugov_start() and topology_normalize_cpu_scale() is a problem, I think. > If so, I can restart schedutil governor after new capacity is updated. Hmm, that feels a bit overkill, but that should at least be a correct way of updating sg_cpu->{min, max} in a non-racy way. And CPU capacity changes are infrequent, so the overhead of re-starting the governor isn't a major issue, I suppose. 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 ... Thanks, Quentin