From patchwork Tue Jan 9 13:53:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 123961 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4047474qgn; Tue, 9 Jan 2018 05:53:48 -0800 (PST) X-Google-Smtp-Source: ACJfBosXJyvFftKX8imPAi8aVKwEgS6XIg4l5CpkKYMqodVhh19zZqrmuGB3fxyfEvT6nnIDHKPq X-Received: by 10.99.125.70 with SMTP id m6mr12260608pgn.415.1515506028867; Tue, 09 Jan 2018 05:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515506028; cv=none; d=google.com; s=arc-20160816; b=nnLIbVOt0GD0CxORu7EHgpvz6SUZaGKEKdiyqKUETHxAxgjVQ+5DFgfqxlVoByhjRs jZkwpoOXmYhyEmgizqKzJAxjW57t0Ak55Oq8Hlb3f64t+GXXt9vsljtFtpw5vDhVWUUH LWOiGGXXFyjiy5XuqRbV74fC6HOkoe26iF0GPa+pQOtBfahrS1xrL23WbW7thYfvLvwo R/ZfxHW3c4yzeRXpY0ehfyTulL8cPF45urC8z+ryXa1/dOmYgr1cZ3i6ke3A4OCnWgKU yUIvhTCFVdnKAaAMs02Ii1JkQAZvv7CMr3a53Cbawq+SJ5F+S4rkQjez9jUWpxTV/g4r o7xw== 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=2OVBF5+dc/kVtiUqLAsVzLBkf0TykvdDQ/YCTgDvEGs=; b=0tdyfFonoKiXJ7n+x98c0E3KS6UM+a0bIspZHr9cMxjLoIn2dSawMKVBzkGb5HSCwf l3IXTfPHVewr+/q2HQGrz29B+cCmDdcgGYHSfuTbDa/17eY7KNhGG1lJtmeF8ckkV15A NQ+dEbM6ChFdb7pGtJJwZZNvj0T9TQsGOpQS2Ldau1nwx0k8ZAL7IjdX3UxGfqWVRBQw 6vuVqOwDETU1pcJXc4pv1fW4uSzvvhGB5qRYHVE6/9hCNJIXRbe6uhYysFCo5Gn2zcmZ z2fRB8K1ZaJbNx4a9Y2e81JKgVbgytrNjKA439Zeg5cBMQGWDeejjCuzmSVZ6FAdtgLi lyRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fj1zWBqk; 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 q77si5335608pfq.400.2018.01.09.05.53.48; Tue, 09 Jan 2018 05:53:48 -0800 (PST) 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=Fj1zWBqk; 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 S1758154AbeAINxq (ORCPT + 28 others); Tue, 9 Jan 2018 08:53:46 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:46795 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758091AbeAINxU (ORCPT ); Tue, 9 Jan 2018 08:53:20 -0500 Received: by mail-wm0-f68.google.com with SMTP id r78so20649934wme.5 for ; Tue, 09 Jan 2018 05:53:20 -0800 (PST) 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=2OVBF5+dc/kVtiUqLAsVzLBkf0TykvdDQ/YCTgDvEGs=; b=Fj1zWBqkjL7rkjwq7LbWguAJbobcSwlLAQc16KeRJH37aA/KcBu6HEEury01WvCmV1 ML5vARGQ+7p1aE/BhCSFVMuuO0KtGyZY2odpjYfJ9q6TDtUZcLMeDMuHc6mlWEHmx3zd iUYsoYp1clzwDq4a8QUHU/yCW4AXJd8fg9sdg= 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=2OVBF5+dc/kVtiUqLAsVzLBkf0TykvdDQ/YCTgDvEGs=; b=bDwONSbdFS+YRNIHgI5gOdT7FRN+oow8mY9XqSTpdF27Mz7c9s+YLF/PTlaOt7Nrg4 XWsOpxnfc9m4nSjtT0pExt7WaSk0QyLek0v1isv2j5ah/dJ5/ckvvdq83sDB+4S7xLwx YBrPukf51AVe2tJDhZ2Hu1YtTQIW4DileCmrLUmhP1q/EOoOjxQ9hInKvnLe2uT1HzXb NJRTcYAysgRwtPVGyGaoE3M+PIg+y6fMIph9LSi4wSSPvM2PtrvY8OHQRI7RPhZyoxk4 0bvjdairg8zDsYBuk0rIWRVjXZyjh3TkbMqdFZOT9qg42oWUVYD1PEuTaT1X1aqbCAkH JO4w== X-Gm-Message-State: AKGB3mIyNOrloMxupXV3fkERSlQcjXZdIQqpdKKQ5txfDJTaAjBNW/i7 CC04HcgGxBlXvK2WrvyOoWVxNA== X-Received: by 10.28.218.207 with SMTP id r198mr11676098wmg.37.1515505999344; Tue, 09 Jan 2018 05:53:19 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:f51d:768f:aab1:18e6]) by smtp.gmail.com with ESMTPSA id e7sm15070597wrd.82.2018.01.09.05.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jan 2018 05:53:18 -0800 (PST) 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 RESEND v3 3/3] cpufreq/schedutil: add rt utilization tracking Date: Tue, 9 Jan 2018 14:53:06 +0100 Message-Id: <1515505986-21997-4-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515505986-21997-1-git-send-email-vincent.guittot@linaro.org> References: <1515505986-21997-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 2f52ec0..d8ba31b 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -183,7 +183,7 @@ static void sugov_get_util(unsigned long *util, unsigned long *max, int cpu) cfs_max = arch_scale_cpu_capacity(NULL, cpu); - *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; }