lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Aug 2019 04:00:15 -0700
From:   tip-bot for Qais Yousef <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     qais.yousef@....com, peterz@...radead.org, mingo@...hat.com,
        hpa@...or.com, viresh.kumar@...aro.org, vincent.guittot@...aro.org,
        linux-kernel@...r.kernel.org, rjw@...ysocki.net,
        tglx@...utronix.de, mingo@...nel.org
Subject: [tip:sched/core] cpufreq: schedutil: fix equation in comment

Commit-ID:  5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c
Gitweb:     https://git.kernel.org/tip/5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c
Author:     Qais Yousef <qais.yousef@....com>
AuthorDate: Fri, 2 Aug 2019 11:46:28 +0100
Committer:  Peter Zijlstra <peterz@...radead.org>
CommitDate: Thu, 8 Aug 2019 09:09:31 +0200

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 <qais.yousef@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
Acked-by: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "Rafael J . Wysocki" <rjw@...ysocki.net>
Link: https://lkml.kernel.org/r/20190802104628.8410-1-qais.yousef@arm.com
---
 kernel/sched/cpufreq_schedutil.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ