From patchwork Tue Oct 2 07:34:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 147959 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4832744lji; Tue, 2 Oct 2018 00:34:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV62t5bN3iz9Xfjv/6pO2wLAYCAE4xxW/cK8eCZLr3BClLCQs1X/IB/xoAVpB7FwvMAUuiK+J X-Received: by 2002:a62:6699:: with SMTP id s25-v6mr14987997pfj.84.1538465668071; Tue, 02 Oct 2018 00:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538465668; cv=none; d=google.com; s=arc-20160816; b=XLJ2BmNQ3LRILOfw1Ta/bdgkGQ6Hq0YnpJjl9DxVlOwaXI+hWAzrTNG9dFW8SHJ7rz 7RXii45m4epMqa8JgwCu7BDJa87kkbXBBwHBglPPgzwaWkdxwhwC15nHqXId7OyZvCBM mMM8yOnnzfBgyVzpV/G0dvG0264Zq9fc49bHbOr13FnZXYkQJNPJwZku+xv8GxTHDOwh ++FisNktkOUzSfZSr7a96bIA0759lroQZpObcnTAELBRuKLbhZGv31IegxxxL+y/Hy34 MLAQx9SDOGGL5R6GUAEYVLYTk3p8gY7XGOALgudnQNofiEe8pgSPVPdHe4jxDtSPNK/X KrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=pLII2LRqsWid2S759f1Dke3ghEEXgn8dyYxpyWLSt/o=; b=XAFVIq9r4Xw5qsQLHUYu6Rwis4J0y11clRgqKcTEKOWgNv9XazhwD1E/+32V/oPhqo NqThPyASDw0S4nhzBLCG0/d5KrUe2VMpI3gGbOmndfTyWZoE1l79vaQ18LQEuSrZHUYG A1jOZgYlTfbC8cuqcJ4pgjvb+LvrvG+AiD9Lta+IptPrVbBrQ5CeA8bLFrhfl/M/jEIM CeoPQyIgPdKaV3567Wr94do4JdatpEkd7/sZmE6XbND5Mnlr42WwsM/NsBk8X909bTwK wMdgU0H0qd8sfaJR8y3H606clqiQ4lOJCpYFyC7c5Ngj5tQNDobD3dz04TFsHmyQvnZu 8+bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gXw/Zh8U"; 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 t18-v6si14401789ply.305.2018.10.02.00.34.27; Tue, 02 Oct 2018 00:34:28 -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="gXw/Zh8U"; 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 S1727195AbeJBOQR (ORCPT + 32 others); Tue, 2 Oct 2018 10:16:17 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36066 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbeJBOQQ (ORCPT ); Tue, 2 Oct 2018 10:16:16 -0400 Received: by mail-wm1-f66.google.com with SMTP id n23-v6so1111208wmc.1 for ; Tue, 02 Oct 2018 00:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pLII2LRqsWid2S759f1Dke3ghEEXgn8dyYxpyWLSt/o=; b=gXw/Zh8ULL7jJJLgMe3+hxjUUgCWwFzVhWrscGLPfOoRLi9KXlNjHauUPzpHpJislk HAKUotctt36OVdLfw4Kl8IF67lKZJkPDsq554CBWYp+PW9J4rn0LcCLNOGgA+Ni/Q/Qc MXkcmlQsxF0HGeV7TYTDWpDsrDbPBO3tIbQtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pLII2LRqsWid2S759f1Dke3ghEEXgn8dyYxpyWLSt/o=; b=QIRF3oGKx9/US3WnU6PZZfRyHwNWFRWCV+nEgeKCKIG0JQPDiWn9JX9NPqKDJkeEq6 KnAI2CX+MWvSvlEYxwpjwfLgc52d2I9D9S7VgFp3ZiaUuukT3gGvGwXknmDuLfGol0xs a65R+iG/y4EVj2CbqGbVx9TBp9+9PwOXV87c8zDOnx456ryQjNiYTzaz7CrSRZt3i321 hniS+aHMzjt6RaGtaKRp/dC6W9wrpuV0fPkm+VXwqRXSOGQZvBTCyOcQ8n5EAA0SUkKL 9wc8YB5b/wiDTqov0VTtcMivgrJJOi1+QWvs77t4dkFSomI1tl8y5iTVg9yNWHwpW4eO loxw== X-Gm-Message-State: ABuFfojsr1wpcJTvIdBaWqynRuMM+QwkfXKIJx7tUWnmypJE3OoR+bnQ xQtwciMxeSkHRaO/9zvuzMLaWA== X-Received: by 2002:a1c:4406:: with SMTP id r6-v6mr1002756wma.4.1538465663860; Tue, 02 Oct 2018 00:34:23 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:99b3:4272:8254:6430]) by smtp.gmail.com with ESMTPSA id w2-v6sm16967782wre.46.2018.10.02.00.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Oct 2018 00:34:23 -0700 (PDT) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org Cc: kernellwp@gmail.com, rjw@rjwysocki.net, Vincent Guittot Subject: [PATCH v2] sched/schedutil : optimize computation of utilization in schedutil Date: Tue, 2 Oct 2018 09:34:17 +0200 Message-Id: <1538465657-20605-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Scaling the utilization of CPUs with irq util_avg in schedutil doesn't give any benefit and just waste CPU cycles when irq time is not accounted but only steal time. Skip the irq scaling when irq time is not accounted Suggested-by: Wanpeng Li Signed-off-by: Vincent Guittot --- kernel/sched/cpufreq_schedutil.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 3fffad3..edbc4d2 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -238,6 +238,7 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu) if ((util + cpu_util_dl(rq)) >= max) return max; +#ifdef CONFIG_IRQ_TIME_ACCOUNTING /* * There is still idle time; further improve the number by using the * irq metric. Because IRQ/steal time is hidden from the task clock we @@ -249,6 +250,7 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu) */ util = scale_irq_capacity(util, irq, max); util += irq; +#endif /* * Bandwidth required by DEADLINE must always be granted while, for