[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180528104127.GB1293@localhost.localdomain>
Date: Mon, 28 May 2018 12:41:27 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: peterz@...radead.org, mingo@...nel.org,
linux-kernel@...r.kernel.org, rjw@...ysocki.net,
dietmar.eggemann@....com, Morten.Rasmussen@....com,
viresh.kumar@...aro.org, valentin.schneider@....com,
quentin.perret@....com
Subject: Re: [PATCH v5 08/10] cpufreq/schedutil: take into account interrupt
Hi Vincent,
On 25/05/18 15:12, Vincent Guittot wrote:
> The time spent under interrupt can be significant but it is not reflected
> in the utilization of CPU when deciding to choose an OPP. Now that we have
> access to this metric, schedutil can take it into account when selecting
> the OPP for a CPU.
> The CPU utilization is :
> irq util_avg + (1 - irq util_avg / max capacity ) * /Sum rq util_avg
IIUC the code below you actually propose that
util = [(max_cap - util_irq) * util_rq] / max_cap + util_irq
where
util_rq = /Sum rq util_avg
util_irq = irq util_avg
So, which one is what you have in mind? Or am I wrong? :)
[...]
> static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu)
> @@ -190,9 +192,17 @@ static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu)
> if (rq->rt.rt_nr_running) {
> util = sg_cpu->max;
> } else {
> + /* Sum rq utilization*/
> util = sg_cpu->util_dl;
> util += sg_cpu->util_cfs;
> util += sg_cpu->util_rt;
> +
> + /* Weight rq's utilization to the normal context */
> + util *= (sg_cpu->max - sg_cpu->util_irq);
> + util /= sg_cpu->max;
> +
> + /* Add interrupt utilization */
> + util += sg_cpu->util_irq;
Thanks,
- Juri
Powered by blists - more mailing lists