Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1369546

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

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on scheduler utilization data
Date 2016-04-01 21:20 +0200
Message-ID <rjcLU-sT-17@gated-at.bofh.it> (permalink)
References <rfjLX-5N2-3@gated-at.bofh.it> <rfjLX-5N2-1@gated-at.bofh.it> <ridAl-6zf-1@gated-at.bofh.it> <rjbmN-7Po-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Apr 1, 2016 at 7:49 PM, Steve Muckle <steve.muckle@linaro.org> wrote:
> On 03/29/2016 07:00 PM, Rafael J. Wysocki wrote:
> ...
>> +config CPU_FREQ_GOV_SCHEDUTIL
>> +     tristate "'schedutil' cpufreq policy governor"
>> +     depends on CPU_FREQ
>> +     select CPU_FREQ_GOV_ATTR_SET
>> +     select IRQ_WORK
>> +     help
>> +       This governor makes decisions based on the utilization data provided
>> +       by the scheduler.  It sets the CPU frequency to be proportional to
>> +       the utilization/capacity ratio coming from the scheduler.  If the
>> +       utilization is frequency-invariant, the new frequency is also
>> +       proportional to the maximum available frequency.  If that is not the
>> +       case, it is proportional to the current frequency of the CPU with the
>> +       tipping point at utilization/capacity equal to 80%.
>
> This help text implies that the tipping point of 80% applies only to
> non-frequency invariant configurations, rather than both. Possible to
> rephrase?

Sure.

What about:

"If that is not the case, it is proportional to the current frequency
of the CPU.  The frequency tipping point is at utilization/capacity
equal to 80% in both cases."

> ...
>> +static unsigned int sugov_next_freq_shared(struct sugov_policy *sg_policy,
>> +                                        unsigned long util, unsigned long max)
>> +{
>> +     struct cpufreq_policy *policy = sg_policy->policy;
>> +     unsigned int max_f = policy->cpuinfo.max_freq;
>> +     u64 last_freq_update_time = sg_policy->last_freq_update_time;
>> +     unsigned int j;
>> +
>> +     if (util == ULONG_MAX)
>> +             return max_f;
>> +
>> +     for_each_cpu(j, policy->cpus) {
>> +             struct sugov_cpu *j_sg_cpu;
>> +             unsigned long j_util, j_max;
>> +             u64 delta_ns;
>> +
>> +             if (j == smp_processor_id())
>> +                     continue;
>> +
>> +             j_sg_cpu = &per_cpu(sugov_cpu, j);
>> +             /*
>> +              * If the CPU utilization was last updated before the previous
>> +              * frequency update and the time elapsed between the last update
>> +              * of the CPU utilization and the last frequency update is long
>> +              * enough, don't take the CPU into account as it probably is
>> +              * idle now.
>> +              */
>> +             delta_ns = last_freq_update_time - j_sg_cpu->last_update;
>> +             if ((s64)delta_ns > TICK_NSEC)
>
>>> Why not declare delta_ns as an s64 (also in suguv_should_update_freq)
>>> and avoid the cast?
>>
>> I took this from __update_load_avg(), but it shouldn't matter here.
>
> Did you mean to keep these casts?

Not really.  I'll fix that up shortly.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on scheduler utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-22 03:00 +0100
  Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-03-26 02:20 +0100
    Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-26 03:10 +0100
      Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-27 03:40 +0200
        Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-03-28 20:20 +0200
          Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on scheduler utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-29 14:30 +0200
          Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Peter Zijlstra <peterz@infradead.org> - 2016-03-31 14:30 +0200
            Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-31 14:40 +0200
              Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-04-01 20:20 +0200
  Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-28 11:10 +0200
    Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on scheduler utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-29 15:00 +0200
      Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-30 03:20 +0200
        Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Peter Zijlstra <peterz@infradead.org> - 2016-03-31 14:30 +0200
      Re: [PATCH v6 7/7][Resend] cpufreq: schedutil: New governor based on  scheduler utilization data Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-30 06:20 +0200
  [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on scheduler utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-30 04:00 +0200
    Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-30 07:40 +0200
      Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-30 13:40 +0200
        Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-03-30 19:10 +0200
          Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-30 19:30 +0200
            Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-03-31 03:50 +0200
    Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Peter Zijlstra <peterz@infradead.org> - 2016-03-31 14:20 +0200
      Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-31 14:20 +0200
        Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Peter Zijlstra <peterz@infradead.org> - 2016-03-31 14:50 +0200
    Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Peter Zijlstra <peterz@infradead.org> - 2016-03-31 14:50 +0200
    Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-04-01 19:50 +0200
      Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-04-01 21:20 +0200
        Re: [Update][PATCH v7 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-04-01 21:30 +0200
    [Update][PATCH v8 7/7] cpufreq: schedutil: New governor based on scheduler utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-04-02 01:10 +0200
      Re: [Update][PATCH v8 7/7] cpufreq: schedutil: New governor based on  scheduler utilization data Steve Muckle <steve.muckle@linaro.org> - 2016-04-02 03:10 +0200

csiph-web