Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1363481ybi; Fri, 2 Aug 2019 14:12:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhdfjdlcYmy4ZOVTX/7cZyLkY7VUfYDGg1AhuEb69GnqfaSnYwre9a6jfE3zDCYj0LlNbv X-Received: by 2002:a62:7d96:: with SMTP id y144mr61753971pfc.156.1564780340556; Fri, 02 Aug 2019 14:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564780340; cv=none; d=google.com; s=arc-20160816; b=zUwZRgneu8tUWeSc3+/03Ssco87i5yzvP5uKRhq1KH83455LsAuRpEuIDIjt5bhAgF oNIv6JZhLgji1VFW32ObUTfp729GpLZvoVSAwEw58Xy8bPIXcoRq2dmiujCcFyoqUygs 7NJwMPePv/xyb46j54uxF3nmu/WJk1VbXC0jSMrwYWwRDU/3AiCRv4T0wzYN+CPJhcle QissuDetIYlr4kOmWTzdjqUWI49F9r63vUAvrN7syQh1Q/cP9H9BexWvkFnigWrHtdFG MNclsFkJqXSQ47bbU3gnXPHBYKscpiWHvc8bfILYPfO1a/6Gm62Ndefa+xSCYVBSccqY rxpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=VIGspbPQyfbF3Hy5CBmkzB3CbVh5HtnU5qXJhuhhM08=; b=sDrVUTW7ggaX9LoShdwrSGnTizygUhidkXkLakTUDTQaefLcBl8MHaVo/Vs1ZOS36O Ldbr/yzIOsMV7vWj2JgKgtKuTDqJQKK5/P4921ShbZ2HG2fsalvtLTCqmUxFp9uhW7dA UA+HW0qay0hjhcYwnx9pzXKPBoaWiRL9fLDZn5ioptbUQ+2bvfZHGojcBUVhx63VAXjp cr0fcmMUKiMTBVTAwb1b9f11ODnD2rYlUd1zFsahi0RMKt/uvsiR9icTWVv/881VyndL AGZ7YHDkzkNIFhAJWg5CdpgYMRPpsGiGfi7Gs8BC7IXu4P+xPQ2hwwdbqKqS+f8Xiffl VYyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si41447802pfl.68.2019.08.02.14.12.02; Fri, 02 Aug 2019 14:12:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405725AbfHBKqm (ORCPT + 99 others); Fri, 2 Aug 2019 06:46:42 -0400 Received: from foss.arm.com ([217.140.110.172]:49566 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405641AbfHBKqj (ORCPT ); Fri, 2 Aug 2019 06:46:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62618344; Fri, 2 Aug 2019 03:46:39 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (unknown [10.1.194.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5ED193F71F; Fri, 2 Aug 2019 03:46:38 -0700 (PDT) From: Qais Yousef To: Peter Zijlstra , "Rafael J . Wysocki" Cc: Viresh Kumar , Ingo Molnar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Qais Yousef Subject: [PATCH] cpufreq: schedutil: fix equation in comment Date: Fri, 2 Aug 2019 11:46:28 +0100 Message-Id: <20190802104628.8410-1-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.17.1