lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] thermal: cpufreq_cooling: Reuse effective_cpu_util()
    On Tue, Jul 14, 2020 at 12:06:53PM +0530, Viresh Kumar wrote:
    > Several parts of the kernel are already using the effective CPU
    > utilization to get the current load on the CPU, do the same here instead
    > of depending on the idle time of the CPU, which isn't that accurate
    > comparatively.
    >
    > Note that, this (and CPU frequency scaling in general) doesn't work that
    > well with idle injection as that is done from rt threads and is counted
    > as load while it tries to do quite the opposite. That should be solved
    > separately though.
    >
    > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    > ---
    > drivers/thermal/cpufreq_cooling.c | 65 +++++++------------------------
    > 1 file changed, 15 insertions(+), 50 deletions(-)
    >
    > diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
    > index 6c0e1b053126..74340b2b0da7 100644
    > --- a/drivers/thermal/cpufreq_cooling.c
    > +++ b/drivers/thermal/cpufreq_cooling.c
    > @@ -23,6 +23,7 @@
    > #include <linux/thermal.h>
    >
    > #include <trace/events/thermal.h>
    > +#include "../../kernel/sched/sched.h"

    Hard NAK on that. Just writing it should've been a clue.

    \
     
     \ /
      Last update: 2020-07-14 10:24    [W:3.583 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site