[lkml]   [2017]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v3 3/6] cpufreq: schedutil: update CFS util only if used
Currently the utilization of the FAIR class is collected before locking
the policy. Although that should not be a big issue for most cases, we
also don't really know how much latency there can be between the
utilization reading and its usage.

Let's get the FAIR utilization right before its usage to be better in
sync with the current status of a CPU.

Signed-off-by: Patrick Bellasi <>
Reviewed-by: Dietmar Eggemann <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Rafael J. Wysocki <>
Cc: Viresh Kumar <>

Changes from v2:
- rebased on v4.15-rc1

Change-Id: I9291a560bcad7db76894e3f0fcdb917511d0479e
kernel/sched/cpufreq_schedutil.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 448f49de5335..40521d59630b 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -351,10 +351,9 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
unsigned int next_f;
bool rt_mode;

- sugov_get_util(&util, &max, sg_cpu->cpu);

+ sugov_get_util(&util, &max, sg_cpu->cpu);
sg_cpu->util = util;
sg_cpu->max = max;

 \ /
  Last update: 2017-11-30 12:49    [W:0.331 / U:4.776 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site