From patchwork Tue Oct 9 16:25:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 148512 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5109718lji; Tue, 9 Oct 2018 09:25:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV63iVPb1OUZtQl5ZKHT6U3COlzLq9CZnACvOk6q8AQkiuuXLcYqOKq/iUVxfGAdZLQhmX3o6 X-Received: by 2002:a62:9605:: with SMTP id c5-v6mr30795271pfe.26.1539102317700; Tue, 09 Oct 2018 09:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539102317; cv=none; d=google.com; s=arc-20160816; b=eBcAwgp5NwMh59K1Ak1t5T85w3NdqyyIwt7SEuypAj2UtWdVEStlZpuK81Xxy6Oobg /iq9GPnxskVrLoJYRGzBRn2bgjSuP/wqoPkaNXo+2MNYNcpOxPhU+nmvyh10bgZNRNhM VzKx/HTadVWNapod/xHJgkouKqsDUYgVZI7XKulSXWdFzJ9OPss0dbzU8R35tWTM9Q+E oxE412WyWHpbN/1CKMfgAT4u2SexarzulB964wJ5eZFVFKV3RIsArQcROY9xgDSt/hMZ 7nrn2fEbJtDcGaphf929/zHGinpnogE6HOCk3mye26JOIeX1JX88vw+J61bBK1blLM0o ZFxA== 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; bh=k9t4ZQyhj3UHB2vpFiS96ld6Wm363DNdyAeKB8jO/D8=; b=nTCC2G5vfukJ75wUBScvqA1m/Fa4Ir/j0nwubRhAV4mPO0QGV5w5X+YokUnhGabeeZ LtCAMUM3rSJ1RYhEzeHlCG48omymLNyafOaGkp/36BGtoRwE1kwWuDPN/Ro8yZS0QgGg gm3NUlC2IlNxYxEJ8sqKMF4pt02YiW44Ne6QQMZpfbeI1XXmqcOKx5BOg30dMO4vl3+0 2VpiqYFV/ulSkOh6RolSmb8oBgvPU6Y+jFM1RSjgHchWrPKlsEDcTjQCPdmGvGk7aP/+ eaC2k4oIEee56Sp56jSUD1VISn/ev5aHiTuBaHOhYmcS9LeXLDgltdwLzF21A4iFutoK 1ovw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aFYhAl95; 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 33-v6si22775147plu.386.2018.10.09.09.25.17; Tue, 09 Oct 2018 09:25:17 -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.s=google header.b=aFYhAl95; 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 S1727336AbeJIXm6 (ORCPT + 32 others); Tue, 9 Oct 2018 19:42:58 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:35867 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbeJIXm6 (ORCPT ); Tue, 9 Oct 2018 19:42:58 -0400 Received: by mail-qt1-f195.google.com with SMTP id u34-v6so2301885qth.3 for ; Tue, 09 Oct 2018 09:25:14 -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=k9t4ZQyhj3UHB2vpFiS96ld6Wm363DNdyAeKB8jO/D8=; b=aFYhAl95BW4L9QN7e/W030cStVJJKryh0zaKjg8BqMNvfm+X6GuHEX527vtwOs3Ldh bz9Vaf0vkJ7P/PAPDf/xA501Z1tQhjteOvNnC0nX9hyw5yFyLAH5Q2jJVIfU0Y079fwh ntW/ZjBmwdH4k4/iIBE19vywXV1+vj6FBLhzk= 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=k9t4ZQyhj3UHB2vpFiS96ld6Wm363DNdyAeKB8jO/D8=; b=LyHoTRZtlhJHpLKnIPcR4FY6f0yHigikzclyNvUXy8SaCLRjN2OcpqApDuD0cWaWsd Q0DTIY8s4toIkaNoHTVoi79+7RjLOUVALwi2cFp+NhHuFma32RZ31ISDG6mpVmRfHu0T Z55TisAKbhOHR06cbSZQeBCX3pFdADuVl+qlVcBJw1sEDrb02VsTQlIR6or/NsX8xUVB AJ0IOdq+DLDA0P3oWfdhNg1vDmL8QZmyKK3b9Vt7rVC08TuBpTxf4LZfwiGl3CIyEfFc GVdtf6KEa2D4Aoo4D+5CwJ3t026NyHdZ6ke4mgx8MdYTyzztH2B1GfwHclG8zHHp7QpX 5KrQ== X-Gm-Message-State: ABuFfoh8VDttNFCqSlpbRn2V28l7rsCo+bDmLB2lPJFq4PuYmSMmJoxA N3Vcwpmp7GfBiGhUkEKEdAJoxM8vFPJK9Q== X-Received: by 2002:ad4:414b:: with SMTP id z11-v6mr19680915qvp.206.1539102314077; Tue, 09 Oct 2018 09:25:14 -0700 (PDT) Received: from Thara-Work-Ubuntu.fios-router.home (pool-71-255-245-97.washdc.fios.verizon.net. [71.255.245.97]) by smtp.googlemail.com with ESMTPSA id o7-v6sm10441169qkc.67.2018.10.09.09.25.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 09:25:13 -0700 (PDT) From: Thara Gopinath To: linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, rui.zhang@intel.com Cc: gregkh@linuxfoundation.org, rafael@kernel.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, javi.merino@kernel.org, edubezval@gmail.com, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, quentin.perret@arm.com, ionela.voinescu@arm.com, vincent.guittot@linaro.org Subject: [RFC PATCH 5/7] sched/fair: Enable CFS periodic tick to update thermal pressure Date: Tue, 9 Oct 2018 12:25:00 -0400 Message-Id: <1539102302-9057-6-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1539102302-9057-1-git-send-email-thara.gopinath@linaro.org> References: <1539102302-9057-1-git-send-email-thara.gopinath@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce support in CFS periodic tick to trigger the process of computing average thermal pressure for a cpu. Signed-off-by: Thara Gopinath --- kernel/sched/fair.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.1.4 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b39fb59..7deb1d0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -21,6 +21,7 @@ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra */ #include "sched.h" +#include "thermal.h" #include @@ -9557,6 +9558,8 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued) if (static_branch_unlikely(&sched_numa_balancing)) task_tick_numa(rq, curr); + + update_periodic_maxcap(rq); } /*