[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1603448113.git.viresh.kumar@linaro.org>
Date: Fri, 23 Oct 2020 15:50:19 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Amit Daniel Kachhap <amit.kachhap@...il.com>,
Amit Kucheria <amitk@...nel.org>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Javi Merino <javi.merino@...nel.org>,
Juri Lelli <juri.lelli@...hat.com>,
Mel Gorman <mgorman@...e.de>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Steven Rostedt <rostedt@...dmis.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Zhang Rui <rui.zhang@...el.com>
Cc: linux-kernel@...r.kernel.org, Quentin Perret <qperret@...gle.com>,
Lukasz Luba <lukasz.luba@....com>, linux-pm@...r.kernel.org
Subject: [PATCH V2 0/2] cpufreq_cooling: Get effective CPU utilization from scheduler
Hi Peter/Rafael,
I thought about the fallback thing getting registered by scheduler with
cpufreq core, and after Peter's comment about two interactions with
cpufreq I didn't like it much. Either way we are exposing the cpu
utilization finding algorithm to rest of the kernel, through cpufreq or
otherwise.
And so kept it simple for now. Scheduler exposes a single routine,
sched_cpu_util(), along with the related enum and that's all schedutil
and cpufreq_cooling stuff want.
V1->V2:
- Name the routine as sched_cpu_util().
- Make it more self sufficient and remove few parameters that aren't
required to be exposed anymore to rest of the kernel.
- Better cleanups in schedutil and cpufreq_cooling.
---
Schedutil and fair.c use schedutil_cpu_util() to get an idea of how busy
a CPU is. Do the same for cpufreq_cooling which uses CPU's idle time
currently to get load, which is used to calculate the current power
consumption of the CPUs, which isn't that accurate.
Tested with hackbench and sysbench on Hikey (octa-core SMP) and no
regression was observed.
--
Viresh
Viresh Kumar (2):
sched/core: Rename and move schedutil_cpu_util() to core.c
thermal: cpufreq_cooling: Reuse sched_cpu_util()
drivers/thermal/cpufreq_cooling.c | 70 +++++-------------
include/linux/sched.h | 19 +++++
kernel/sched/core.c | 113 +++++++++++++++++++++++++++++
kernel/sched/cpufreq_schedutil.c | 116 +-----------------------------
kernel/sched/fair.c | 6 +-
kernel/sched/sched.h | 29 +-------
6 files changed, 156 insertions(+), 197 deletions(-)
--
2.25.0.rc1.19.g042ed3e048af
Powered by blists - more mailing lists