Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2279461ybh; Sun, 4 Aug 2019 21:55:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuWBhGAtIwq2xgPokY1PDY/3g3RMhYfBAQrXPJhETHTqU9UYRLMJ4WzJw236BheENerKat X-Received: by 2002:a17:902:6ac6:: with SMTP id i6mr143411394plt.233.1564980933125; Sun, 04 Aug 2019 21:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564980933; cv=none; d=google.com; s=arc-20160816; b=r2QEQMLoXTKim59qil+80qBm72ySwItQufj+VFikUyWm1gZ6irdelyYWwByCaou+Rt 5Et4FHbXCEsrwVbrab5EECNFnhGgdlSjE6FHOPIR0kfawAY1hZdSYm0FG/sl850WHedN hlGyZfScMqkJE/XIo0j71zq2VphX4GIYROHh8YQ7WvHzhh5uPm9EzyBf5Cuej2gTIg87 jVp9ZdUsh3LBq8yBj6jg6F7S1B+YSZEu4MIoYz3ijaWI3Zm9CElI9NYwv8p5zBpdRwIW Fu3VTu2KMzAoCxwS0dkATQvYsxFsaMO/m0hkrKvRPKgG6W/TLiNg+DNhQZodnn986Jr7 KD0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2GskBwU0LKm3Qey9cLPXZ9UmAlsONTLCvAR16WwJe5c=; b=iHhHG/95QeU5XRtGoQ8J0y7zhbEyhbjruyWM1QpiS+3hbmNCo3M2C7m5XXO+uU3lK/ zV3WsUaaIHLn1EJ3z2I+E60FKDKDgMUMRbxm5pHFwWnOQZ/L3trzozpJC1BY4APE/RZJ dF8SaDGF+/2KnembSjwPqhaL2+qsaO9gEXACB2J8RyuljqRam2Y+PpFKjE5IPn/KleO8 qAxBahWdS8JcIdBRkIzOqPkMv/llC4osFtQKGa6eQ1BKNY9jqrlCyNgZ+qCP5DIFsxkK fi0o774S6AULfgCavhYkrpgUx/tjgmQiadlSEtlFwDAkk5MvXj6fOohIEKxEZnf0cE95 3qVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qeVUxo93; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si47221523pfg.260.2019.08.04.21.55.17; Sun, 04 Aug 2019 21:55:33 -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=@linaro.org header.s=google header.b=qeVUxo93; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726304AbfHEEyq (ORCPT + 99 others); Mon, 5 Aug 2019 00:54:46 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41099 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfHEEyq (ORCPT ); Mon, 5 Aug 2019 00:54:46 -0400 Received: by mail-pl1-f194.google.com with SMTP id m9so35834432pls.8 for ; Sun, 04 Aug 2019 21:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2GskBwU0LKm3Qey9cLPXZ9UmAlsONTLCvAR16WwJe5c=; b=qeVUxo93f4JOkWG7HfvkEB937Vk6VFrHtvF1i1NykVMXAzNUEa198UwcV47V6Nv1CT D0o1aLts4e0Ld9plI+Dg+ngBG4WrF2AxBPWzRhXCI/FUu9O6AaTKi7SuPsESGKx+gNav TRddsdN9xws2/tSL4HqgvAFzxdf9NCk6ApAK63mMcYf/vKW7Awsa5ECQGVBKsgl0xCyw HI6/JaW2B87aGdQdkac2PmHcXUW9IkK1M4QaL2pnXFcT8b4MKAYD5XJ2/9ov9UF3kbcm Fg9FMPC2lEY3pfutB1jszDrgHDM448ChAxPi10YMA07hlWVlulXXULYnF91VHKfaiAIT R6TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2GskBwU0LKm3Qey9cLPXZ9UmAlsONTLCvAR16WwJe5c=; b=WXtsZpZKZNl4QPtvZCHPybmzTmpvYmhmCXsO0kqmfZnGVn5617m/BCmUbHen+dDIhL 3lzKMmTxbNOJgnV08V6nXXfHHUlO34rAeoFgFNI6fKCg5UA1Vgd5aPulnjF0/mwJKfBh Exf+HXgKzzr/h/T1GRz0sWC/2wC/jDwdNvk25z0vpO6mlsKhEkmLNymN77tBBjAxoEWL ygb90nkK5Lyc+mGgplXSOWgdvxj8WdHrMVeW8bcVqdIpjd7icAMljWeProsM0BIBMmah /WbtMeuH7qXfFgx6yOcQRT0iaYmBuDDSmv1CS39pVpV93+1zQ0HPPigbeveek7iBH+f6 5QMg== X-Gm-Message-State: APjAAAV3RvxYWei5CcJo2N5Ivvr/oW/zIeXqgcUxfySQc6tm5lQ5/Cc9 5S+a/B4XfZFcb0icK55+u4LmCA== X-Received: by 2002:a17:902:20e5:: with SMTP id v34mr20812881plg.136.1564980885324; Sun, 04 Aug 2019 21:54:45 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id u97sm16043672pjb.26.2019.08.04.21.54.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Aug 2019 21:54:44 -0700 (PDT) Date: Mon, 5 Aug 2019 10:24:42 +0530 From: Viresh Kumar To: Qais Yousef Cc: Peter Zijlstra , "Rafael J . Wysocki" , Ingo Molnar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: schedutil: fix equation in comment Message-ID: <20190805045442.3pnaawo4nlrieoie@vireshk-i7> References: <20190802104628.8410-1-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802104628.8410-1-qais.yousef@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02-08-19, 11:46, Qais Yousef wrote: > 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; Acked-by: Viresh Kumar -- viresh