From: "Wang, Vincent (王争)" <Vincent.Wang@unisoc.com>
To: "Quentin Perret" <quentin.perret@arm.com>,
"Zhang, Chunyan (张春艳)" <Chunyan.Zhang@unisoc.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Chunyan Zhang <zhang.lyra@gmail.com>
Subject: 答复: [PATCH V4] sched/cpufreq: initialize iowait_boost_max and iowait_boost with cpu capacity
Date: Mon, 4 Mar 2019 07:35:04 +0000 [thread overview]
Message-ID: <9099990618e242e1bab77ce3f9d9b1e3@BJMBX02.spreadtrum.com> (raw)
In-Reply-To: <20190222105957.wxhlcmoag5f3i4fi@queper01-lin>
Did you mean the value of arch_scale_cpu_capacity() is changed in cpu_capacity_store()?
If so, I can restart schedutil governor after new capacity is updated.
________________________________________
发件人: Quentin Perret <quentin.perret@arm.com>
发送时间: 2019年2月22日 18:59
收件人: Zhang, Chunyan (张春艳)
抄送: Ingo Molnar; Peter Zijlstra; Wang, Vincent (王争); linux-kernel@vger.kernel.org; Chunyan Zhang
主题: Re: [PATCH V4] sched/cpufreq: initialize iowait_boost_max and iowait_boost with cpu capacity
On Friday 22 Feb 2019 at 18:37:46 (+0800), Chunyan Zhang wrote:
> @@ -823,6 +823,8 @@ static int sugov_start(struct cpufreq_policy *policy)
> {
> struct sugov_policy *sg_policy = policy->governor_data;
> unsigned int cpu;
> + unsigned long max_cap = arch_scale_cpu_capacity(NULL, policy->cpu);
> + unsigned long min_cap = max_cap * policy->min / policy->cpuinfo.max_freq;
>
> sg_policy->freq_update_delay_ns = sg_policy->tunables->rate_limit_us * NSEC_PER_USEC;
> sg_policy->last_freq_update_time = 0;
> @@ -837,7 +839,9 @@ static int sugov_start(struct cpufreq_policy *policy)
> memset(sg_cpu, 0, sizeof(*sg_cpu));
> sg_cpu->cpu = cpu;
> sg_cpu->sg_policy = sg_policy;
> - sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
> + sg_cpu->max = max_cap;
> + sg_cpu->min = min_cap;
> + sg_cpu->iowait_boost_max = max_cap;
Unfortunately, I don't think you can do that only here. The return value
of arch_scale_cpu_capacity() can change at run time. And it does on arm64,
see drivers/base/arch_topology.c.
> }
>
> for_each_cpu(cpu, policy->cpus) {
> --
> 2.17.1
>
Thanks,
Quentin
next prev parent reply other threads:[~2019-03-04 8:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 10:37 Chunyan Zhang
2019-02-22 10:59 ` Quentin Perret
2019-03-04 7:35 ` Wang, Vincent (王争) [this message]
2019-03-04 13:58 ` 答复: " Quentin Perret
2019-03-04 15:26 ` Peter Zijlstra
2019-03-04 16:48 ` Quentin Perret
2019-03-04 17:40 ` Peter Zijlstra
2019-03-04 17:44 ` Peter Zijlstra
2019-03-04 17:50 ` Quentin Perret
2019-03-04 18:47 ` Peter Zijlstra
2019-03-04 19:11 ` Quentin Perret
2019-03-05 8:32 ` [PATCH] sched/cpufreq: Fix 32bit math overflow Peter Zijlstra
2019-03-05 10:55 ` Rafael J. Wysocki
2019-03-06 2:01 ` Chunyan Zhang
2019-03-06 7:50 ` Chunyan Zhang
2019-03-09 14:35 ` [tip:sched/urgent] sched/cpufreq: Fix 32-bit " tip-bot for Peter Zijlstra
2019-03-19 11:10 ` tip-bot for Peter Zijlstra
2019-03-04 17:40 ` 答复: [PATCH V4] sched/cpufreq: initialize iowait_boost_max and iowait_boost with cpu capacity Vincent Guittot
2019-03-04 17:49 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9099990618e242e1bab77ce3f9d9b1e3@BJMBX02.spreadtrum.com \
--to=vincent.wang@unisoc.com \
--cc=Chunyan.Zhang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quentin.perret@arm.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®