Message ID | 1495616452-7582-3-git-send-email-vincent.guittot@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp177657qge; Wed, 24 May 2017 02:04:48 -0700 (PDT) X-Received: by 10.98.57.212 with SMTP id u81mr37547886pfj.9.1495616688775; Wed, 24 May 2017 02:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495616688; cv=none; d=google.com; s=arc-20160816; b=XY6PFd1qxpO1Vl72IhjZozelaXo3IKhT2MrHzEF4XEexEqCw9cz3kxc3C2hFvWW14M elGDot2OoJH0pUWzaOY3aSXa5lKyxjStB/jITbX3449UBmEmBAL/3j+O38hoFHzDtIaV runKZHWzUIXver3dRlkTo6lukDv8JLZvd+/7UDx/TuzD4gkxZhXK/z83lutWmUVdL1bJ TGk8xWWL+cT8kdQ+uCCZRHVwsTZckSpbcdyplK2nq2KY4eLWYT8qccrRZ6pIsBgSPrMT AqZ97WOHnLEYQFy5OSKCnExO4ZMh66LHNQCBxCbD2oFinRo2yyC6LAyY2qPyc/DI61vg QFfg== 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=AjSPiEScNaXHfSdPL8Qfj8QO0uCQA4cWYnO3sR67+ss=; b=gp+xLABCO6g+ANXnmC3pnLc+q3NeEEl6QPnLcBAiwHt1vLvon2pR8mMFxwvNZAe4us CwmVIPA52SLudETrVaKg9lN40l+OJCcrhhxftPQaG0tpS3KKSjmeFtqjOn7G35Fee0c4 J4X+lGPgg9+CH/70QkScBO/aiX3P1jO1KGjeHq2XnlybxXv/012UabKmdFBL/j8HJ/nR WDApOXT0nP+AoLUKuz2L1edljAVguXY2xjRZZIcJOOb8fXCQHP9muZ8ncqk52K1Xs5Ba Uq5jKdex23dLHLYgWLjI4aKhFX8DwSxybsYivYyAEdmaW0t8QtXcG4TCh8y9TlY2EtcT 8qGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p71si2081461pfa.29.2017.05.24.02.04.48; Wed, 24 May 2017 02:04:48 -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; 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 S967208AbdEXJEq (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Wed, 24 May 2017 05:04:46 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35877 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161972AbdEXJBB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2017 05:01:01 -0400 Received: by mail-wm0-f52.google.com with SMTP id 7so55763954wmo.1 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2017 02:01:01 -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=AjSPiEScNaXHfSdPL8Qfj8QO0uCQA4cWYnO3sR67+ss=; b=O6I3Ju17j6LoN8uNVSWUTfAbTR4N38aibE7F8YZcbiWjYivuO8gmyK5WMlg2DZHq2z Xe6mF3sIpvp64gztvrgKusnpVl/x8r5sp0zhhN5oOuQpWBJ1DIUIigEUK0BOf+8N4Cjt zWARhRdUXB2xEWlQei72/Qo3lgAOzH9J14jyI= 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=AjSPiEScNaXHfSdPL8Qfj8QO0uCQA4cWYnO3sR67+ss=; b=SAwTEv7aeIhu425fz5d5ZdBVqNkAfYXKWlmaxGNaK6BNlL7nakD+MbYt+I/cNg99rQ rOdHJxRIS8NRY+soFHF2FNAZCM8zl4zY6byfLDdmVlyb7oKkMOEVJv/9Wenc0Hb2M72j WLKcCCEnqw4AHgCUJmhnVV7budrCI4aW9bEL+wUjcA7X0VJlwYmonsF88MDZCSPxgKKM 6YIpt6NhVKjb3zolB0AR7XhWg5osv0cXcg5z8kybV8+g/nOfAbgcxKCdTTexhIkWpdfw 7mLcisdjVYq3iQmCXA38db5Jgj8XhFaMefXFbj+cqmQtVCoCYHewQNTtnUZSfQvPdTYq fZKA== X-Gm-Message-State: AODbwcAEfphGzhRDhmm6OlxESfAPge8JazVrOkfz2rGvwPiUam1hoxNJ sg2kZs7Ltk6zVxmD X-Received: by 10.223.134.80 with SMTP id 16mr22151803wrw.62.1495616460451; Wed, 24 May 2017 02:01:00 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:90ff:f881:739b:af16]) by smtp.gmail.com with ESMTPSA id w96sm4552076wrc.14.2017.05.24.02.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 02:00:59 -0700 (PDT) From: Vincent Guittot <vincent.guittot@linaro.org> To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org Cc: rjw@rjwysocki.net, juri.lelli@arm.com, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, Vincent Guittot <vincent.guittot@linaro.org> Subject: [PATCH 2/2] cpufreq/schedutil: add rt utilization tracking Date: Wed, 24 May 2017 11:00:52 +0200 Message-Id: <1495616452-7582-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495616452-7582-1-git-send-email-vincent.guittot@linaro.org> References: <1495616452-7582-1-git-send-email-vincent.guittot@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
track rt rq utilization
|
expand
|
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c 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; }
Add both cfs_rq and rt_rq's utilization when selecting an OPP for cfs task as rt task can preempt and steal cfs's running time. This prevent frequency drops when rt tasks steal running time to cfs tasks which appear lower than they are. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> --- kernel/sched/cpufreq_schedutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4