lkml.org 
[lkml]   [2019]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 09/16] sched/cpufreq: uclamp: Add utilization clamping for RT tasks
On 23-Jan 11:28, Peter Zijlstra wrote:
> On Tue, Jan 15, 2019 at 10:15:06AM +0000, Patrick Bellasi wrote:
> > - util = (type == ENERGY_UTIL)
> > - ? util_cfs
> > - : uclamp_util(rq, util_cfs);
> > - util += cpu_util_rt(rq);
> > + util = cpu_util_rt(rq);
> > + if (type == FREQUENCY_UTIL) {
> > + util += cpu_util_cfs(rq);
> > + util = uclamp_util(rq, util);
> > + } else {
> > + util += util_cfs;
> > + }
>
> Or the combined thing:
>
> - util = util_cfs;
> - util += cpu_util_rt(rq);
> + util = cpu_util_rt(rq);
> + if (type == FREQUENCY_UTIL) {
> + util += cpu_util_cfs(rq);
> + util = uclamp_util(rq, util);
> + } else {
> + util += util_cfs;
> + }
>
>
> Leaves me confused.
>
> When type == FREQ, util_cfs should already be cpu_util_cfs(), per
> sugov_get_util().
>
> So should that not end up like:
>
> util = util_cfs;
> util += cpu_util_rt(rq);
> + if (type == FREQUENCY_UTIL)
> + util = uclamp_util(rq, util);
>
> instead?

You right, I get to that core after the patches which integrate
compute_energy(). The chuck above was the version before the EM got
merged but I missed to backport the change once I rebased on
tip/sched/core with the EM in.

Sorry for the confusion, will fix in v7.

Cheers

--
#include <best/regards.h>

Patrick Bellasi

\
 
 \ /
  Last update: 2019-01-23 15:34    [W:0.156 / U:8.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site