From patchwork Tue Jan 9 13:53:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 123960 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4047060qgn; Tue, 9 Jan 2018 05:53:20 -0800 (PST) X-Google-Smtp-Source: ACJfBouK2Gp1EWGmEwDepsCtObQubn8CITXXGNvvzqf9950glbHZ/UARySYcd11BRA4iN+B5Jorl X-Received: by 10.159.198.9 with SMTP id f9mr16089809plo.322.1515506000430; Tue, 09 Jan 2018 05:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515506000; cv=none; d=google.com; s=arc-20160816; b=skYql+mklGjjRAlt4mNfF49II6at4L2DqtMJoSiI/TTuw6ddHnRwcmAKCedN8MWMc4 8zTG13pcV/sTQZYq7P/KxvlX9N28T4cAGjqen9xLpzXkG5ICn74oKg2JrK1UP+IbDLFA iy4riUkd8vzcGL9mZ7p8GaGuXcOd0tjOFj34da0EzYymI/Fi1uh3yJuFgspURvTununO GbZ+iA9ZWT5Z2azIl0b7cNlHOPyzrFWjQ7KQXkPJuIBeDYUzRgaRWAYkfpAAlFMI0vv+ xyLLIHJW+7Wjahf/ErnebwTFGxYxpImjPoP6utHQw3iyo83NSJCFY2+8YS1sub5xCdvQ qYJQ== 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:arc-authentication-results; bh=VGQEIQ26AKTVLFz0y9OFuOjOZ/Bhqt3yuHPTmTKDehI=; b=Uilo1wTl5zQpZsae6GwotNoDUC0j0i6qCUvvl0E2bYv/oBy/SAcsdwAcSLk6NMSZUh v/fYzEQuJ4RQpuNvN8TvGHPt0ax2Q3B675Y6HkFc3IGVOUTauD3g/wTDdYlhF8ZYQ19z 51q2mCfMDg+DmeInxZxGtlNTyQpRMP+lG+zuGkzLuKCunWD4oEIzZyzjq4GNDeqC1AzY KcMyCo0zkQGQUQcTIAY0qRpRfIDYSY1irULRhYSMDltE6HmAP2jipmYTsnw9VfVEKtdN E28C1dHEmWu1SP/Dk77QFsFGddoHjMujiaCg4saORviGshfWs7P4CBjmcJCyd2yxTjz8 mJFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UfLuQeJE; 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 n129si4154387pga.782.2018.01.09.05.53.20; Tue, 09 Jan 2018 05:53:20 -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=UfLuQeJE; 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 S1758088AbeAINxS (ORCPT + 28 others); Tue, 9 Jan 2018 08:53:18 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:40453 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbeAINxQ (ORCPT ); Tue, 9 Jan 2018 08:53:16 -0500 Received: by mail-wm0-f65.google.com with SMTP id f206so20763788wmf.5 for ; Tue, 09 Jan 2018 05:53:16 -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; bh=VGQEIQ26AKTVLFz0y9OFuOjOZ/Bhqt3yuHPTmTKDehI=; b=UfLuQeJEin94PLTLR8Ez+umZM8yKKyRmMexW4WXFLIEQRo30zTOeKCjWpNMxB8kaXp 6AmWjwtVlm34WDFnFUBomFI50/dit1gtRUVqeyR0uDhpACx0Zz/TsfySthd6/UmMlleE ELf3a6sKxXmFJ4fTkXOAofVq/iz/b2fPHUKPM= 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=VGQEIQ26AKTVLFz0y9OFuOjOZ/Bhqt3yuHPTmTKDehI=; b=UkSaPOftNE1w0N+6wJi2IDfMbKi3OB8Bn45OooMSdSTnLsVET3MgqXYuYTfmTjqbPE mjKPVerNWOPjtKJchm/eNFve8nTpsgNQfIhVD4U4ye90nF61gmQnSIyMxPCuVX6MaZSj KSyKyL9xeJv2C2Nq9j5Dv9REoIhZNp+UQGZ/SZsqxfRK9s9QvVnpBV9Jbutasj5CyFlj AFnTPnQST1fCSC1Onzp3qlknVEi8jWfdLAvc7HywtPVMnapmPY0Tj4kpxqG4DsZ0t0gP 8XlVI4Uxc0vqiny2VJJ7L3c1NVF9JI1eNZjwT5k0dafdj6CAKLTSAjDWc/OkhovG8tTp dITA== X-Gm-Message-State: AKGB3mLDHzwCI+RL/yX0XlTU4EyAYroUEyPFqWoNtUtBdYFzYaB6qxI1 oRxgxrE6CX30m51SU/+BntLeIw== X-Received: by 10.28.184.201 with SMTP id i192mr11574143wmf.23.1515505995299; Tue, 09 Jan 2018 05:53:15 -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.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jan 2018 05:53:14 -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 0/3] sched/rt: track rt rq utilization Date: Tue, 9 Jan 2018 14:53:03 +0100 Message-Id: <1515505986-21997-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 When both cfs and rt tasks compete to run on a CPU, we can see some frequency drops with schedutil governor. In such case, the cfs_rq's utilization doesn't reflect anymore the utilization of cfs tasks but only the remaining part that is not used by rt tasks. We should monitor the stolen utilization and take it into account when selecting OPP. Patch 1 move pelt code in pelt.c file Patch 2 tracks utilization of rt_rq. Patch 3 adds the rt_rq's utilization when selection OPP for cfs tasks This patchset doesn't change the OPP selection policy for RT tasks Change since v2: - move pelt code into a dedicated pelt.c file - rebase on load tracking changes Change since v1: - Only a rebase. I have addressed the comments on previous version in patch 1/2 Vincent Guittot (3): sched/pelt: Move pelt related code in a dedicated file sched/rt: add rt_rq utilization tracking cpufreq/schedutil: add rt utilization tracking kernel/sched/Makefile | 2 +- kernel/sched/cpufreq_schedutil.c | 2 +- kernel/sched/fair.c | 310 +----------------------------------- kernel/sched/pelt.c | 331 +++++++++++++++++++++++++++++++++++++++ kernel/sched/pelt.h | 24 +++ kernel/sched/rt.c | 8 + kernel/sched/sched.h | 21 +++ 7 files changed, 389 insertions(+), 309 deletions(-) create mode 100644 kernel/sched/pelt.c create mode 100644 kernel/sched/pelt.h -- 2.7.4