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

Juri Lelli
2016-03-17T11:29:43Z

Hi Rafael,

On 17/03/16 01:01, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

[...]

> +static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
> + unsigned int next_freq)
> +{
> + struct cpufreq_policy *policy = sg_policy->policy;
> +
> + sg_policy->last_freq_update_time = time;
> +
> + if (policy->fast_switch_enabled) {
> + if (next_freq > policy->max)
> + next_freq = policy->max;
> + else if (next_freq < policy->min)
> + next_freq = policy->min;
> +
> + if (sg_policy->next_freq == next_freq) {
> + trace_cpu_frequency(policy->cur, smp_processor_id());
> + return;
> + }
> + sg_policy->next_freq = next_freq;
> + next_freq = cpufreq_driver_fast_switch(policy, next_freq);
> + if (next_freq == CPUFREQ_ENTRY_INVALID)
> + return;
> +
> + policy->cur = next_freq;
> + trace_cpu_frequency(next_freq, smp_processor_id());
> + } else if (sg_policy->next_freq != next_freq) {
> + sg_policy->work_cpu = smp_processor_id();

+ sg_policy->next_freq = next_freq;

> + irq_work_queue(&sg_policy->irq_work);
> + }
> +}

Or we remain at max_f :-).

Best,

- Juri