Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2298700imm; Mon, 28 May 2018 05:38:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUCg1C+90g7obb3HJrJaXL7ahaNaiUKqy4ycaKRcHZm4Xqk/8to29CsaSKowsoc7rj0L8b X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr13749253plb.184.1527511118523; Mon, 28 May 2018 05:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527511118; cv=none; d=google.com; s=arc-20160816; b=y8fnDshQWZepPS2vIcPfLvN3eCs5xZFSJLpTixDBNeOKZ+0u37RrY8YnUfOJeMnHPL iZV83opBNN/Vkl5GzyWCQT2GwGmPFefr9OyRUMTY9uH63Hqt1etCsgppPGiGSBuPyo6R Z77dtP6SEttb9hAFXeJm4As5erUWuv82kVU+Zliwcvp66J/Zl64FQ7HqPjMzFK4JtuTN 2l4gDvskvuSYlD54NqrpS3FqCynZJDY6TcpGDMDDaQwSgMXqovWxHIYUrEELpV3qxNbq 5epagZoKtRXd0trXjg4Nhf6QXdyQpLMe9MjDLv1mo4AVeu144Ti/v51aM/p6UCiWix2s NOzg== 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:arc-authentication-results; bh=o5BPZS7/j9E6cHYPD7sB2BkaZ74tlBH9n2znXR+knLA=; b=OZRoY4u2Gj0ssX3wiO5YDDswCyC90m8gx7xdtMS4jCaTDFoG+uloLV7abttidzffK/ OmU/2njpAUL8uK+zOW3+0vDvkEjOd5UtbGq88OHW2qqSgaqLg/WRiXRokKdLD9+wcGf4 GH2iFTnPBeCNKTikx5TyA8q2L3xbykOpjd0PdwMrHPxRH9sbQfv84n7Xc7BBivu5oZSy TQlkBJHRMQRxUWIcUfTeorUuBhRt/1ew6+/OmSTfjH4VdphSpPjdjJCxIrfqN6NP9B7A nYQRunJY3fugYEo50/SXj4whek52KSRKv+9QDJcUgS9Cw7b/txbVpygAA5JW3bxqm72g xXyA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si23319083pge.228.2018.05.28.05.38.23; Mon, 28 May 2018 05:38:38 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938942AbeE1Mhk (ORCPT + 99 others); Mon, 28 May 2018 08:37:40 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34173 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938934AbeE1Mhf (ORCPT ); Mon, 28 May 2018 08:37:35 -0400 Received: by mail-wm0-f68.google.com with SMTP id q4-v6so23965387wmq.1 for ; Mon, 28 May 2018 05:37:34 -0700 (PDT) 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=o5BPZS7/j9E6cHYPD7sB2BkaZ74tlBH9n2znXR+knLA=; b=U7mzJOAgWBWYZI02htqw6LpKsaxIqcu0T26N+/VSPwK+fX2UPnX7KNQF3OFnZFyUIj N8NxtmqC3/pPW1HHG4ijKHbURG3RN4rTAVmLuc9hsefRgpJbW1dKZQDUC195HCJUDZKa GNIVOCNX25T1PGG038O4gCXjj14p6Vpicgd/IMOR/c4lmmG63Oqk4vMj/pwE7fBJwpsG dD+6HPQrV0z3UX953k3yqQwQXUM73F2QBSAMoP/AcNKDeJrMLDrgQPuOdxuC3yDdkb5q U9DMBE3xyw7vdeuh0rTKUVAwmMQaS8LU8CEtZtN+7ZK5CwkWRqnKYQcZdl2hQxe0ozy7 CFmA== X-Gm-Message-State: ALKqPwdWSZlJ272+nn3OO9aJHq8zg7mhbOsrtxqm9dN+J3pch4n1ALzu W+x9H1Ur8nXRD5LwqQrRxt1a9g== X-Received: by 2002:a1c:ce0e:: with SMTP id e14-v6mr7565354wmg.87.1527511054044; Mon, 28 May 2018 05:37:34 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id v196-v6sm12526935wmf.36.2018.05.28.05.37.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 May 2018 05:37:33 -0700 (PDT) Date: Mon, 28 May 2018 14:37:30 +0200 From: Juri Lelli To: Vincent Guittot Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Dietmar Eggemann , Morten Rasmussen , viresh kumar , Valentin Schneider , Quentin Perret Subject: Re: [PATCH v5 08/10] cpufreq/schedutil: take into account interrupt Message-ID: <20180528123730.GC1293@localhost.localdomain> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <1527253951-22709-9-git-send-email-vincent.guittot@linaro.org> <20180528104127.GB1293@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/05/18 14:06, Vincent Guittot wrote: > Hi Juri, > > On 28 May 2018 at 12:41, Juri Lelli wrote: > > Hi Vincent, > > > > On 25/05/18 15:12, Vincent Guittot wrote: > >> The time spent under interrupt can be significant but it is not reflected > >> in the utilization of CPU when deciding to choose an OPP. Now that we have > >> access to this metric, schedutil can take it into account when selecting > >> the OPP for a CPU. > >> The CPU utilization is : > >> irq util_avg + (1 - irq util_avg / max capacity ) * /Sum rq util_avg > > > > IIUC the code below you actually propose that > > > > util = [(max_cap - util_irq) * util_rq] / max_cap + util_irq > > > > where > > > > util_rq = /Sum rq util_avg > > util_irq = irq util_avg > > > > So, which one is what you have in mind? Or am I wrong? :) > > mmh ... aren't they equal ? > > util = [(max_cap - util_irq) * util_rq] / max_cap + util_irq > util = [(max_cap/max_cap - util_irq/max_cap) * util_rq] + util_irq > util = [(1 - util_irq/max_cap) * util_rq] + util_irq > util = util_irq + [(1 - util_irq/max_cap) * util_rq] Ah, indeed.