[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9e89355-9503-4623-9320-e4a4f57dcd98@arm.com>
Date: Thu, 2 Nov 2023 13:03:32 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, rostedt@...dmis.org,
bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
vschneid@...hat.com, rafael@...nel.org, viresh.kumar@...aro.org,
qyousef@...alina.io, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Cc: lukasz.luba@....com, wyes.karny@....com, beata.michalska@....com
Subject: Re: [PATCH v2 1/2] sched/schedutil: rework performance estimation
On 26/10/2023 19:09, Vincent Guittot wrote:
[...]
> @@ -153,14 +152,38 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
> return cpufreq_driver_resolve_freq(policy, freq);
> }
>
> +unsigned long sugov_effective_cpu_perf(int cpu, unsigned long actual,
> + unsigned long min,
> + unsigned long max)
> +{
> + unsigned long target;
> + struct rq *rq = cpu_rq(cpu);
> +
> + if (rt_rq_is_runnable(&rq->rt))
> + return max;
> +
> + /* Provide at least enough capacity for DL + IRQ */
> + target = min;
> +
> + actual = map_util_perf(actual);
> + /* Actually we don't need to target the max performance */
> + if (actual < max)
> + max = actual;
> +
> + /*
> + * Ensure at least minimum performance while providing more compute
> + * capacity when possible.
> + */
> + return max(target, max);
The superfluous `unsigned long target` is still there?
return max(min, max) is much cleaer.
[...]
Powered by blists - more mailing lists