Re: [PATCH v4 7/7] cpufreq: schedutil: New governor based on scheduler utilization data

From: Rafael J. Wysocki
Date: Wed Mar 16 2016 - 17:46:55 EST


On Wednesday, March 16, 2016 06:53:41 PM Peter Zijlstra wrote:
> On Wed, Mar 16, 2016 at 03:59:18PM +0100, Rafael J. Wysocki wrote:
> > +static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
> > + unsigned int next_freq)
> > +{
> > + struct cpufreq_policy *policy = sg_policy->policy;
> > +
> > + if (next_freq > policy->max)
> > + next_freq = policy->max;
> > + else if (next_freq < policy->min)
> > + next_freq = policy->min;
>
> I'm still very much undecided on these policy min/max thresholds. I
> don't particularly like them.

These are for consistency mostly.

It actually occurs to me that __cpufreq_driver_target() does that already
anyway, so they can be moved into the "fast switch" branch. Which means
that the code needs to be rearranged a bit here.