From patchwork Mon Oct 14 00:58:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 176105 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3886641ill; Sun, 13 Oct 2019 17:58:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRiBv4v7wI7AsyLmCLqPU1f6g82LLLyosyBAe6N8W4J76Slw1XZhit/yqNaogqlSH4RMr1 X-Received: by 2002:a17:906:3582:: with SMTP id o2mr3927333ejb.54.1571014716219; Sun, 13 Oct 2019 17:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571014716; cv=none; d=google.com; s=arc-20160816; b=fMfTZv2cjGsyVNQjBUew6Kk9xHBVf8kpXfszJGa5LtLv6iufyD1uSOgMNF1+lxcgU5 ngtL2kVh4CRZHQIW0h3C7uC9VCvYk4FyiJf2v8W8c8zxO3P1CDCM7G9irkvZwZos8YkM G/ex91KKZyoP2w4Sl2HGEuOXmJ8YHIZZZF6aknf0GRWRN76QVdZZnfZGZOcOkHV7avSn uDaqcrByQRR/01nzXfDU7Q0ADSFDAD+HkgGFjs2094KGJ8wkYqiXV15/2Oo8xsqZ836t eEg2baKfoCT4EjvHnCLzt1VMFrGu2Q4v6bQ8QpcW5uY75PccZ5k9swPX3ZpeJxPKLV0A WFZA== 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=wKxSPMl7EPM6ok8Zx7OEY5cb3mUO9ZZjqXNAqG0TCKE=; b=fo+yJkkF0SVr4GLV/JbQ5U5xjogxqg+ojDwNtVAM64RwSJ1TNV/o+qIhfSaDdGfVYj j0rpPg0hSo8ijk8z8T2cHE3IAobAoBqPlzw+ln7PVx/2UPfvoDB6W4UVL1ZOSiUhECGg vlgMWJJ0XplkuR3rFcpe4h2WPTDoJquXWxm4V6jPb1H2h9pYkWDyLhKnWubXfbTUw89b N5Ch93Sa4tmAa3Hp1hIXoWtiojUHOnG1/j4kjiDZjCUqezo8yFbO7OT+B2TjvjOm0xbl tewLRv51yx5l+PCWETm3t+s3W2T/Vw3ngpQJqRHjmRjJP96e0k+SdWxgga95FBxjGDLY 8SBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZR7YFFW; 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 b56si11746068edb.418.2019.10.13.17.58.36; Sun, 13 Oct 2019 17:58:36 -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=UZR7YFFW; 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 S1729763AbfJNA6f (ORCPT + 10 others); Sun, 13 Oct 2019 20:58:35 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:42757 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729737AbfJNA6d (ORCPT ); Sun, 13 Oct 2019 20:58:33 -0400 Received: by mail-qk1-f196.google.com with SMTP id f16so14444226qkl.9 for ; Sun, 13 Oct 2019 17:58:33 -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=wKxSPMl7EPM6ok8Zx7OEY5cb3mUO9ZZjqXNAqG0TCKE=; b=UZR7YFFWzMKcXxJ9dqs7MxnGNzG8a7Oahd6jRqFl17qBcCT2ZZTsf+ArewfUbYNN+w Ie8AcxY33Y6pyzpr/3teLmy1IwRmU7b0QhxBlBYeo9FkFGYVz8h8y1wOlMNtR3eiV+1n vDDQAAfmtw6It/CQwfDk/a7jXhEmgp3zCroGxG4kG3abDt+C67s+xYPDcAh+895sxAyE L3oG7HBa4PHAEqOvkm9oaysZ4yty+HdaN/tt9fy7iBthAPqEJwqyuuCVotRANKOGRYlv kB8pXhZfN5NWRpQ7hyyiMivjBtviVDArOVvvwojB6OQrJ57+co6nbh9wnGh9OjsD2EUG lCjg== 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=wKxSPMl7EPM6ok8Zx7OEY5cb3mUO9ZZjqXNAqG0TCKE=; b=izSqWoTALjHowtHc15XrWoQ/Ih4ewwzi0VrtaFavG2D2soh9LM4WBuumgrU0QXOtsN bW1JzQ9nJRhmSsG3bcR5WWOMGhupOy24zBivDklICWOcoFuKke3SiuYU+LPC5ef7ZTBm ZuNHPsvoQjhMJJF/wSIXgH0ZNvNOGOkqdFWlVq6naJWESfQnsbnDMutE6BUgPT0g1Hw5 aLtgofSeZ7hZx4EQNA16dC9OxTeJZoGhKiLXgQYhQnGid8kG/m+v8Py3ONkRn4vi/Isg D3KElhji/atRPygOTw7tQscn0NNF4Gvtj5hFvWnaJpISJ6FV8nuOc968tF8txRTVs737 RdXA== X-Gm-Message-State: APjAAAWFVILKG4NxAiNmyVlNA/+qRbUO+RGZ7CHiV2jIL0uqs/aN6+GB 6T+VRhAZ2CEhTrUL4nSJM+tezg== X-Received: by 2002:a05:620a:696:: with SMTP id f22mr27017261qkh.91.1571014712537; Sun, 13 Oct 2019 17:58:32 -0700 (PDT) Received: from Thara-Work-Ubuntu.fios-router.home (pool-71-255-246-27.washdc.fios.verizon.net. [71.255.246.27]) by smtp.googlemail.com with ESMTPSA id c185sm7663901qkf.122.2019.10.13.17.58.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Oct 2019 17:58:31 -0700 (PDT) From: Thara Gopinath To: mingo@redhat.com, peterz@infradead.org, ionela.voinescu@arm.com, vincent.guittot@linaro.org, rui.zhang@intel.com, edubezval@gmail.com Cc: linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, javi.merino@kernel.org, daniel.lezcano@linaro.org Subject: [Patch v3 4/7] sched/fair: Enable CFS periodic tick to update thermal pressure Date: Sun, 13 Oct 2019 20:58:22 -0400 Message-Id: <1571014705-19646-5-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1571014705-19646-1-git-send-email-thara.gopinath@linaro.org> References: <1571014705-19646-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 | 5 +++++ 1 file changed, 5 insertions(+) -- 2.1.4 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 83ab35e..fe7c165 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 @@ -7566,6 +7567,8 @@ static void update_blocked_averages(int cpu) done = false; update_blocked_load_status(rq, !done); + + update_periodic_maxcap(rq); rq_unlock_irqrestore(rq, &rf); } @@ -9925,6 +9928,8 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued) update_misfit_status(curr, rq); update_overutilized_status(task_rq(curr)); + + update_periodic_maxcap(rq); } /*