From patchwork Mon Jun 19 08:51:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 105806 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp773580qgd; Mon, 19 Jun 2017 01:52:01 -0700 (PDT) X-Received: by 10.99.121.204 with SMTP id u195mr2014489pgc.16.1497862321548; Mon, 19 Jun 2017 01:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497862321; cv=none; d=google.com; s=arc-20160816; b=FF89RcweG6NG9T6Fc+5jf1qqnDxAIV+RXyKZhKaSzn+0kNT+WIBoHOkcO0qEjTmHw8 YCwbu9PlObmt8hxzqlA68DdgURuqsCevTviae7mYJNuUXOmXlFMoQrDeV3/BzkfHXAwi 93cLjoBqTNTsLNLmcLNrsY9nI8W8Pyfny3rmsBr9V9q5YjgbROrJgcDmQvuKsH9Ixcbr CEJB+gwqmPdtR4miQPcV4yMuejh09YgGNq+ie/D/qOc9KirjUIqEc0kDrVgB4cyDNjzf jpWnOsYsceE+fJhKC7iUGS151kfyTbeMU6MF2DKRr/ToCXfygCuugQlY6I3RBIhK1ar2 F0lA== 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=/2aQYg8GA/GfdoSlII17QeKnPptY+mxAvLiFA1kJldU=; b=JBgslCjOmaIoHzZtg6Fbsa7A54rLf7WLCpiyjbhUd8c1ebhedwFy7WXSd1kXN8LYx+ bSu02y/Q+pPmw9NjBgUkgyUbSsw/aBjSVYAS6JqzSX03UQy29cvGxMD7VmvuRz/fIBaB e25PJJinNNNVT6H7rIys0UgNSwi031/F2MZFurIRGy89sNaCa9QY5egEqSGL+KjS6LEO Qs3uUtBD6ns1ewiSGUHN4FrMNUuhVNetC1bRAo6WOTQyEMN8e5NN5C2BHNStcXKl95uz wjjw1Bs6TB2sbN/vJ/DzPlqS77g1kyziqrOWBNm9g9uEAgOOzzigUifvJtFXTpf+raqT Wf9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=cZhZHDPo; 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 e19si7324866pfj.161.2017.06.19.01.52.01; Mon, 19 Jun 2017 01:52:01 -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=cZhZHDPo; 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 S1753901AbdFSIvs (ORCPT + 25 others); Mon, 19 Jun 2017 04:51:48 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:34512 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753680AbdFSIvl (ORCPT ); Mon, 19 Jun 2017 04:51:41 -0400 Received: by mail-wr0-f176.google.com with SMTP id 77so67745380wrb.1 for ; Mon, 19 Jun 2017 01:51:41 -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=/2aQYg8GA/GfdoSlII17QeKnPptY+mxAvLiFA1kJldU=; b=cZhZHDPoLm22akE/Wn+KQj2V73YGaPQOemDZpqE8ZmJIwoBDQ0U3oqAGIfSXjf+y5b ci566tNkah4vXH6ykidbljizEW7QTRV8Fv2GaIZkTA6CqT2zlxSNChRcq4E0CWXUL8lS YPA6LqJyhWmr2gGtuhCeEOcZK6NQRIPEnnPb0= 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=/2aQYg8GA/GfdoSlII17QeKnPptY+mxAvLiFA1kJldU=; b=r5A0VplOaFGuMAw/np2PiP0c2GSRCtqGEZNZJz8b69Y5pA1eh6F00avbJ23Fc8A/52 juCwF4ZQHxMd2wgsLXOSTN9XcYK2zc7nagJ7LBhd3hXhozaqG7SmVkgF1M0SuKQSXBeD bMYv0t3XDlshXuev2vbTu/BDdhwjWIG4NoIonGXEWJyAZa1mFYLbirU3WbUju6wGceLc MOnkSyXP1L3Rk65wP4C4pOSUCUl92WFRNaDIuMavVn1g28wmYg/y9D+FqlV/NJDrR2Ou SrkpuOf3RWVBosgy9SogXlG6J8f549ylGa2rWJ5HLHpyn/9PdUQr33PCm3aaI5jzCdoN auhA== X-Gm-Message-State: AKS2vOyVFn+3eZqSfj0VncQzMzryfNG0LIFdsG8PDWlj71zCGUv4lRcM aQKvL4GPnxHrVhZMqo56Gg== X-Received: by 10.223.161.149 with SMTP id u21mr10011143wru.70.1497862300490; Mon, 19 Jun 2017 01:51:40 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:f4a0:4947:8905:10c6]) by smtp.gmail.com with ESMTPSA id n71sm12741463wrb.62.2017.06.19.01.51.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 01:51:38 -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: [PATCH v2 2/2] cpufreq/schedutil: add rt utilization tracking Date: Mon, 19 Jun 2017 10:51:25 +0200 Message-Id: <1497862285-10875-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497862285-10875-1-git-send-email-vincent.guittot@linaro.org> References: <1497862285-10875-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 --- 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 :if expand("%") == ""|browse confirm w|else|confirm w|endif index 622eed1..bc292b92 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -164,7 +164,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; }