From: Qais Yousef Date: Fri, 2 Aug 2019 10:46:28 +0000 (+0100) Subject: cpufreq: schedutil: fix equation in comment X-Git-Tag: v5.4-rc1~176^2~13 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c;p=linux.git cpufreq: schedutil: fix equation in comment scale_irq_capacity() call in schedutil_cpu_util() does util *= (max - irq) util /= max But the comment says util *= (1 - irq) util /= max Fix the comment to match what the scaling function does. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar Acked-by: Vincent Guittot Cc: Ingo Molnar Cc: "Rafael J . Wysocki" Link: https://lkml.kernel.org/r/20190802104628.8410-1-qais.yousef@arm.com --- diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 636ca6f88c8e..e127d89d5974 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -259,9 +259,9 @@ unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs, * irq metric. Because IRQ/steal time is hidden from the task clock we * need to scale the task numbers: * - * 1 - irq - * U' = irq + ------- * U - * max + * max - irq + * U' = irq + --------- * U + * max */ util = scale_irq_capacity(util, irq, max); util += irq;