From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7DE8C32750 for ; Fri, 2 Aug 2019 13:19:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD2A0216C8 for ; Fri, 2 Aug 2019 13:19:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="l1ySagA5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393175AbfHBNTP (ORCPT ); Fri, 2 Aug 2019 09:19:15 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44938 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390134AbfHBNTO (ORCPT ); Fri, 2 Aug 2019 09:19:14 -0400 Received: by mail-lf1-f68.google.com with SMTP id r15so35930576lfm.11 for ; Fri, 02 Aug 2019 06:19:13 -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=d6de4qy5JB+doZsMCQX0aecnYuDsmqqOBKzhXFshuOQ1ojsy9Izy/d3ZuVAmLSwiZF a+e1wwzeOeCltYuTUfM99x7zGGinmbRqvKWk2bFbtuDTXDJg4YjI+iHfvqJECbflH0Zp 6Ulk01D/slur/aF5/NlwpRyQw9OzScUfzH0jrr1RIipQpcpIp8TXpFBExlJSdcCFU8+g amMF/SlhA6Ie4clJSWzUxT+PQrfcL2c/q1E9C3/SWL9PiY77h+lBUAEGaOMyrWJKMcUw p87O8R4sVHaMg7fGrlntco2QGIGrRm3u3WlE8gEswuJyCko2KQafl+2th8hdammxcHai 5XYQ== X-Gm-Message-State: APjAAAXyEMYKddqGvOoKKXiIVNv4d/zSHgymTYSlY2rsXoB4RuDPiBS6 7/szU2fhguIPzhnQlb9SzzQwIfXwu/UFIZaLNymTIA== X-Google-Smtp-Source: APXvYqz47bQkJowsL0czNkaKYpSnYdc6hiS5O1FqH5ObL6RyI/23H5A2jSTq1qZmoQtSLLA93qeYpvHJnfmT/d6Rg94= 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 >