[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200714082352.GN10769@hirez.programming.kicks-ass.net>
Date: Tue, 14 Jul 2020 10:23:52 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Daniel Kachhap <amit.kachhap@...il.com>,
Javi Merino <javi.merino@...nel.org>,
Amit Kucheria <amit.kucheria@...durent.com>,
linux-kernel@...r.kernel.org, Quentin Perret <qperret@...gle.com>,
Rafael Wysocki <rjw@...ysocki.net>, linux-pm@...r.kernel.org
Subject: Re: [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@...aro.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.
Powered by blists - more mailing lists