lkml.org 
[lkml]   [2016]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/8] cpufreq/schedutil: sum per-sched class utilization
    On Sun, Mar 13, 2016 at 10:22:10PM -0700, Michael Turquette wrote:

    > +static unsigned long sugov_sum_total_util(struct sugov_cpu *sg_cpu)
    > +{
    > + enum sched_class_util sc;
    > +
    > + /* sum the utilization of all sched classes */
    > + sg_cpu->total_util = 0;
    > + for (sc = 0; sc < nr_util_types; sc++)
    > + sg_cpu->total_util += sg_cpu->util[sc];
    > +
    > + return sg_cpu->total_util;
    > +}

    > @@ -153,7 +172,7 @@ static unsigned int sugov_next_freq(struct sugov_policy *sg_policy,
    > if ((s64)delta_ns > NSEC_PER_SEC / HZ)
    > continue;
    >
    > - j_util = j_sg_cpu->util;
    > + j_util = j_sg_cpu->total_util;
    > j_max = j_sg_cpu->max;
    > if (j_util > j_max)
    > return max_f;

    So while not strictly wrong, I think we can do so much better.

    Changelog doesn't mention anything useful, like that this is indeed very
    rough and what we really should be doing etc..

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