Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp18105ybh; Fri, 2 Aug 2019 17:06:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJSsZyGbuAiwow4dDbOX34p2PrmBGIbEjoPt+8mWI1ltfipxcM9ILX3AtkylAeYWD+ASJ0 X-Received: by 2002:a63:4a50:: with SMTP id j16mr2528502pgl.126.1564790774815; Fri, 02 Aug 2019 17:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564790774; cv=none; d=google.com; s=arc-20160816; b=bTac1G5MwIK/BWlFdjsb/uy0BWgLC2GY+rsKcdXQp00cZXCussQah0n3p/yDv9h7eH x0ZJZBhU8oDTjYFbAL3UnVuh3XjqmrfQfLYSHfICChoOn9nC1SbwRpMgVZxI/sJdbfqi Z1fOy+KpoNLTGaUAFvFhAejzo617jsFlTIAg8fXr4dLeqiYWU5cKcJLPfhHJWl1AO77c ZvMJMuPK+DiHN1DtgAv793+uX1QjILWi8yuiPDV37B5LKHHkA6GEblMlTI6Y/x0qG9uL JsOKP53iKhiN9J1LsuRowJllQpzQ9S8Em8SnYf9amRwGTZLRAjKMHoCuYbZeMIcaQcDi /Jbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BYlIJPvFssOK64x+am/xS2wZWcj/FM4eymxQYdJNO0E=; b=qM9ndXo1rFVQcH8VX+kcigp/+ghVeC0AjzP6kPw+Lc/hXvCaa4K3KWTTtDICGZHWUJ Jol9H1C+QUYo2Z0YD+wxgfkbLIe09CzfHPbLerjo/WGHsomIUM5f8fogJLtmHAJxH3z6 tsl2FCuYGCHVBLRdqRWgUXSUrgb0HtoJrnQarAmOoq7C54PSS/WAnmgKK3YcJ2HmqkTW 3o3IHeGgoBsUsaHc1gAMn0lagpObC5xd8QFENLE0UIJgjYFaMkBkCPLuQBMg0Cx7k+HZ eYb+sWG1eP4fZjalg7KRhddYCJm+eoddMgX/eTNwhx2kgKLcdYGF45+kg6j1z4V6Geka VCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l1ySagA5; 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 q39si7830718pjc.55.2019.08.02.17.05.59; Fri, 02 Aug 2019 17:06:14 -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=l1ySagA5; 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 S2393180AbfHBNTS (ORCPT + 99 others); Fri, 2 Aug 2019 09:19:18 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35243 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393174AbfHBNTR (ORCPT ); Fri, 2 Aug 2019 09:19:17 -0400 Received: by mail-lf1-f67.google.com with SMTP id p197so52898822lfa.2 for ; Fri, 02 Aug 2019 06:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BYlIJPvFssOK64x+am/xS2wZWcj/FM4eymxQYdJNO0E=; b=l1ySagA5Vavb8EysRzrgjml8hUDMlz1+OS0qxIY9MuS/t4+ISzmv+SatgRNkZes9N4 NxBnY3tJ4i4w6lZXvX/wi3/LKGu49oc9XLvkdBGMC5vn4ZS0qjvfmYZiRqeGd8sOsnNq mzChlxS6LnKnDA804KT9bA2jzbFjy64GLuZ6qhFT32Yor75167thxtgFkXzHU2g6dN8m VhsG+JKQ8tDYXVTWdC+k4Jpdq3+3sPRfEC4a72mi0rku3noody1gCMEbSif5LhOTXOUJ fD0tVWHzbs/PmTwRUALLRcWk5EVEdFTwixoUDVkEWxPKGH/IZmqHrMmlYXFFvL/omZC9 PdAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BYlIJPvFssOK64x+am/xS2wZWcj/FM4eymxQYdJNO0E=; b=qXWltiyg8hKW7dESBkGE3kMV6KhQdcwiVuOABI+ysUrdOiBIrii2vKokEXNB7IR8sw 2kieiL+x8Abv2mV1veKrnwV8r+1QIs6NxcV1Dm9S9rLLx2wxS3GesrIKOVh8WOA8lo0S v0CGTHuzDDm9e/pxa0aStUfrR9nbNRIMa4/VqvDoaT0yPoeIM8o1YSD2LrsiHqrL15zS Gh7wD5IF4HjQXWlj8pSM+J44DdZDOCToAVUmGlKI9SxUxMv5eJe1pUghv2dSd4E6kg2l k1WTkjnO7EApFKl1/ndIJ7CZ3doJFfn/W+YLGfc/wYtyth5lNbLGO1BYEN5CuUpU1uvh ++cw== X-Gm-Message-State: APjAAAUlWeaTOCGOSDNzkvNegfSCkt8BpMLGqdTDlZ27V+uTKbaOEIYJ baeG+Rvl/cU65VCg5hZYxmdcTN2D9KSeQhI0mJ5niA== X-Received: by 2002:a19:ec15:: with SMTP id b21mr10642487lfa.32.1564751952808; Fri, 02 Aug 2019 06:19:12 -0700 (PDT) MIME-Version: 1.0 References: <20190802104628.8410-1-qais.yousef@arm.com> In-Reply-To: <20190802104628.8410-1-qais.yousef@arm.com> From: Vincent Guittot Date: Fri, 2 Aug 2019 15:19:02 +0200 Message-ID: Subject: Re: [PATCH] cpufreq: schedutil: fix equation in comment To: Qais Yousef Cc: Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Ingo Molnar , "open list:THERMAL" , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Aug 2019 at 12: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 FWIW Acked-by: Vincent Guittot > --- > 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 >