Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6679320ybh; Thu, 8 Aug 2019 04:02:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYxzqDF2eDJyInlUr9nN8FCd1d97TmVfP8QGcJfoPRes18I4Ju6140Q6GhN5b6JkscR7Mu X-Received: by 2002:a17:902:f213:: with SMTP id gn19mr13445743plb.35.1565262127472; Thu, 08 Aug 2019 04:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565262127; cv=none; d=google.com; s=arc-20160816; b=TXjDVzWa4WU/Res+gtze6GFabAqnHCY1chkaG8TAn0ziK7ceAdb4rX94ku/fOP5lJC xj1WzTIQ20wvRXOQmyXduBhKdTWXtNncpyabK9psxw4+JrQDd5nBfjP4hcAc7YNbfa+5 1w46BHoXJBnCVS8Bw14EmSZGIa7bN1q/TWJMlhF+feZ89o/SSzimOcsYjgaWspsVO9vJ vvp3K5sGHIxGuxQjz4tuY6wBOz8LaU+UnCCzJESlKIAHIOaym14UsJpNfgDNHeUZhLXv xiuEZQqBRFC1YQVnU4XvWj/QItIBtyULGuLtnBo4ibgpOLAZ9r4rWMmJ7U9gxC8QCGPF y7rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=T+PEPqCjbiKUY0I0c8YBNkeV+FlD66sZGnf9J3SBYfo=; b=bjsuuOdgUnX5bS/x4r7OpsIKUxYri7zY/3VFXWW9NbLN5liHW2/sKwnQuJAuX9S/AU UX7NELHC8qddrl63p57gWKDjfWutOAWWFfPT0azzS/WgS6vmrOATQgGoWKNRfaBtyWKu x3QuxB3Vzc+t8vOyvOAR/Go2aNIvYCK/kuW05NyT7CADm141et7pI8DR9P6T/7s+Rus4 02m2gVFeTs0fm/3i6ITBcqC5/w8sDasztXro2UeVkblIdFKUMx7oRdTvpi6xKgXH5A5a U6AEdi+8rstQINKiUObFDFqHagkIXFSLnYmwBXCc5gUpM52/OgUIDIeR4BYJ/yZOPrBf FmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b="mSR/pXrc"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si52763829pgr.172.2019.08.08.04.01.50; Thu, 08 Aug 2019 04:02:07 -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; dkim=pass header.i=@zytor.com header.s=2019071901 header.b="mSR/pXrc"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389708AbfHHLAd (ORCPT + 99 others); Thu, 8 Aug 2019 07:00:33 -0400 Received: from terminus.zytor.com ([198.137.202.136]:57975 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbfHHLAd (ORCPT ); Thu, 8 Aug 2019 07:00:33 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x78B0FOa3128321 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 8 Aug 2019 04:00:15 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x78B0FOa3128321 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1565262016; bh=T+PEPqCjbiKUY0I0c8YBNkeV+FlD66sZGnf9J3SBYfo=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=mSR/pXrcIvc2yu2wnRXvj1QWnVfHdX9iKgp7PvF8eqAWNethcdgCARp2P8Y9nWtYR pxDw/GnYLyKNp50DFiwGAhXOnFBUeA2jLMybhWhPUJGtSoEdvN2exlSy+OwqtxP85J bYuxQg5CzRjmxkl2Tx2fMjEyJspQMAdkn+VjpA5hvaxSOrTwEVUIwsvOv+wF6MsbY5 wRZC1/ZhAlugP50XcTnW9bI9fu/t6hvUEc9MdU1mnygDsppCF9TEx75DCAUWyAiozm VsbYOiPC47dVaqoR1MMo5JpOtzGyRipYsVxWpBp+3bAp+xcUM33icleJqiZpJiUShX FRoJxhQbqj8uw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x78B0FCr3128317; Thu, 8 Aug 2019 04:00:15 -0700 Date: Thu, 8 Aug 2019 04:00:15 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Qais Yousef Message-ID: Cc: qais.yousef@arm.com, peterz@infradead.org, mingo@redhat.com, hpa@zytor.com, viresh.kumar@linaro.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, tglx@linutronix.de, mingo@kernel.org Reply-To: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, vincent.guittot@linaro.org, qais.yousef@arm.com, peterz@infradead.org, mingo@redhat.com, hpa@zytor.com, viresh.kumar@linaro.org In-Reply-To: <20190802104628.8410-1-qais.yousef@arm.com> References: <20190802104628.8410-1-qais.yousef@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] cpufreq: schedutil: fix equation in comment Git-Commit-ID: 5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c Gitweb: https://git.kernel.org/tip/5c3ceef9ad7b340b0acee6c26d0c9e6429decb2c Author: Qais Yousef AuthorDate: Fri, 2 Aug 2019 11:46:28 +0100 Committer: Peter Zijlstra 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 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 --- 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;