From patchwork Fri Aug 4 13:40:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 109401 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1382762obb; Fri, 4 Aug 2017 06:40:53 -0700 (PDT) X-Received: by 10.84.167.2 with SMTP id c2mr2956397plb.368.1501854053413; Fri, 04 Aug 2017 06:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501854053; cv=none; d=google.com; s=arc-20160816; b=i6chfs9a5+tx1PJKETP8q3mDLzT/5zCnvqYG7AFMXi7BfAwYf1W7whDdjfr8roskWe XIYaumYIBSYt5SOTaVBaevEnM42wOkMk/u6qWnaG3yj56iAYG8pELNeEQ3uL3yZrluMc 1iqFbr2CLp0gnFf18kVP5O/ra6Ut3TvvU0x3o2HUUig41Ymc7w4m+9LRJRUIB1g+ryy1 67BX0AopV1iFlSyZg1znomAS0RVnFoJJ96VfALGtvEEzOxVhsh1+gzvfDLDsq4TXYvFe u5zzeWm8M91lpWjKP8IzAtEOxklC1aRfUclyn5XjhEEjtJ/05LACGvF6vBCkIpoKBiQJ V2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+LEa5NEUtaQDpLOlSAjdC+tviPyNMYGWDSIt/DlQCNg=; b=MN6PP3A90hqeN/kLjIBqS1wq8zMamHS+qeP8pPVYPznHiznhl1MLQ6p8s8OynsDmWw qoEakFkUVYN5VUW+1ERPsxxNNk+xFMtMMf+dvSWBNEg460pcthVK7t4ENcPamNqAK/Jy sEacNTVJjeMjnwQMCg2HtXCAJIr+llmH9j2WZgdxIjUS5Z7z7OPtbvV0WNk6G6YzFfDa fx8gmOCa9YVpizX3Qyrvo71sd39SqyMPAjkLWs4bUDRVz5mEGZqdI9L58uPet1CQSsZZ 5QJMnG+HK24yjJAB23XCKUgWsmoXZSw+EpKW+wAcTG6XIVV7kBWqZk4gWJ2y2qsroffv FpHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=dRk2tjhs; 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 f4si1164413plm.562.2017.08.04.06.40.53; Fri, 04 Aug 2017 06:40:53 -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.b=dRk2tjhs; 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 S1752920AbdHDNkt (ORCPT + 25 others); Fri, 4 Aug 2017 09:40:49 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36216 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbdHDNke (ORCPT ); Fri, 4 Aug 2017 09:40:34 -0400 Received: by mail-wm0-f47.google.com with SMTP id t201so20126124wmt.1 for ; Fri, 04 Aug 2017 06:40:33 -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:in-reply-to:references; bh=+LEa5NEUtaQDpLOlSAjdC+tviPyNMYGWDSIt/DlQCNg=; b=dRk2tjhspd9PUYqgONQRIbHf6WyAAGur+LUf/wCclto+L0zwBA/rG8CFv9tjZmhv2t ysJt5dk5OT38XsbBpq7X0Nrl78Kl/tjBg/p2C/nb8rzcYaDzW0NfciwylCQsWDEtk2Sx WK8qhVsPZmRFjjlzx+HCyOiXzEbHaR+sYzRTg= 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:in-reply-to :references; bh=+LEa5NEUtaQDpLOlSAjdC+tviPyNMYGWDSIt/DlQCNg=; b=TCwvHI2hKt25HkdsqDGkM+QQpZKD4yMxcSvH1+oUBb3bQyHeCuhmlygFthxCsX2KBb v+rWP0T6SfB4K7c/LmyidygbMQLU40bsBHXvfKEgQRQ5N1iP7Uni9axXhlrKysMuRqX+ GGYjT1CQ53s2C7VYTnX3F8HdFKC+DDr/ySWwQdq4UrLke22REqlVzKXL9og1IIf82fHL QnEsYS9GRNyVXZy77k5QkR+Qrxshgyn/ZK6rgYwLrJOpy7X0BI9haEXbNgim749AdQli HoJARD79zemv7AV90kPfBlISEoH6TTFQ4W/hmWevQz0spPM9FLOAYv5iYdOw0RHXWg+r Cbmw== X-Gm-Message-State: AIVw111ta/2KePH4FHDNWlFVPND0Nwwm+Lx5OQmIXLizn8g/6jL+DK4R 1ABpYmS7alYUJ0FQF+xZLw== X-Received: by 10.28.24.83 with SMTP id 80mr1290209wmy.86.1501854032948; Fri, 04 Aug 2017 06:40:32 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:f960:58a5:a4a:6f6c]) by smtp.gmail.com with ESMTPSA id 196sm3903874wmg.36.2017.08.04.06.40.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Aug 2017 06:40:32 -0700 (PDT) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net Cc: juri.lelli@arm.com, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, viresh.kumar@linaro.org, Vincent Guittot Subject: [RESEND PATCH v2 2/2] cpufreq/schedutil: add rt utilization tracking Date: Fri, 4 Aug 2017 15:40:22 +0200 Message-Id: <1501854022-22128-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501854022-22128-1-git-send-email-vincent.guittot@linaro.org> References: <1501854022-22128-1-git-send-email-vincent.guittot@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add both cfs and rt utilization when selecting an OPP as rt can preempt and steal cfs's running time. Signed-off-by: Vincent Guittot --- kernel/sched/cpufreq_schedutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 076a2e3..04fabea 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -161,7 +161,7 @@ static void sugov_get_util(unsigned long *util, unsigned long *max) cfs_max = arch_scale_cpu_capacity(NULL, smp_processor_id()); - *util = min(rq->cfs.avg.util_avg, cfs_max); + *util = min(rq->cfs.avg.util_avg + rq->rt.avg.util_avg, cfs_max); *max = cfs_max; }