From patchwork Tue Oct 22 20:34: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: 177233 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp5372753ill; Tue, 22 Oct 2019 13:34:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyS+XzQVsg7OElVqMD/cax9Bk5F2HaGyqIuzUGl5s1+jODdnWDdfLgdbSs6x/Ot4q71oh7N X-Received: by 2002:a05:6402:1507:: with SMTP id f7mr33662848edw.68.1571776480471; Tue, 22 Oct 2019 13:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571776480; cv=none; d=google.com; s=arc-20160816; b=zNXydYLep7HaFpB2EvPm9yJDLUTBk4AV+PcaXO0WhYMnRicXV6aN8+1po6t26tn4uc qVfrLlaWX0b/ue4yXZmXGNqwlWoclTek9+wDDg3Nqf2BKPSiccb4ASfXP4frTLJF3jqJ cuKNu7VtbnMHY7zMFRB6sbK6NCKjuYLrF2HDG4S5MLC1NtNAVEdaGBbfpVxb1KSkmEFc TRMEEb0EQhggjK3M3hzinB0gWn6xEDcOzzQX+SYdPtQMmXvryUHZMnHYfdF70rST0sNh DMHsDpWWwSG1IXxZVV9eBzrPu0PMAsTAEP20jrPGUtjciRuWfqJZV07Kb0c2k/QYDQGX Vysw== 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=+62b01duIzwhl+lWRPPBbONvvknzw7BTtBn7ok/CsvU=; b=bkAz9iVvuCAPP2jEa4iQ7wGepppputDCBuxgbCaohszDeQ/1dBM5AAQLd6g7At9z7C YtQc2sUnEjOklW3jlO9iJwXFKSL0jiS+0jmbHYy3zIjBb1X0Bw0DS6Dp6sy1R30ULAQa tRRlH6HV6925FzWBMZ8vR6dTq3HU6rCA1FRhrMt0fvGTsiH9kiSKqmb8htISCEQtScnP e1Mgci5yNGJvKgcWMStT4qIgffgc6KxX+NwteE4MXy5JI796pdj+tN2qS3j2STxZ0uld IoCo1ZArWtIJa23H+UkPYRIzowqL4FYksPjp0ryA1hgBJPakAJLIPsutrl46oj5qhPFp kWGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=afhY9KI9; 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 g17si6131618edh.379.2019.10.22.13.34.40; Tue, 22 Oct 2019 13:34:40 -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=afhY9KI9; 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 S2389431AbfJVUef (ORCPT + 26 others); Tue, 22 Oct 2019 16:34:35 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:42761 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389407AbfJVUed (ORCPT ); Tue, 22 Oct 2019 16:34:33 -0400 Received: by mail-qk1-f194.google.com with SMTP id m4so689128qke.9 for ; Tue, 22 Oct 2019 13:34:32 -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=+62b01duIzwhl+lWRPPBbONvvknzw7BTtBn7ok/CsvU=; b=afhY9KI98X7oFg8SEiw6QnjzPR5O+aClzT0lPCL6RRLwqRm4KHhE/dJea/JM6sIhDW 87pXYEQdEdxSuoZ5XetxEQuUvpk53W2X31ARCH0Zhjai2qr7guaEL5Q3pxxn1Ac+ysks xc4GjWgjvF3FKJB+E2sRVXN3TY66jGGEOd9Erz2eAX/5uYgA4Ke04oc1ozzSSMdT624f Kx8oriWjnOkyc+fkgSW3J+C9W24kfVgKxiI6ff6CsLfiOCzRVXnSzixSrZcytlvzHvjx J5DYJ7R3NSUAm7hSwIBp6mMK+3p2omGMCwV1Vsa2ZGPMJqznnTznWwMRk+rC6I1gjloF kh9g== 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=+62b01duIzwhl+lWRPPBbONvvknzw7BTtBn7ok/CsvU=; b=qKxMXsz7jQ6gbFtf1Ez9NlrDWQXlNZvIc9tkvUlel5ZhLjzQmDCsdtSgRJYFYQD7RN I3zW537CNLeXlmEP/cEfyXwsgYxihOJOM79gR8TkxW9+aq1nzsUPBALum+Qyh5qlNS07 MKxZGUbJx1t5E9QvCug2PseT2ZWqQgfjM/K6pByh5XvcQbCfuuDFLP6+SNT8oQ+y37k2 p8OAvmM2+tLZpV5AayW411XLtLBNIu41J12MzRBe5KgopJZDVXb1xrFrNlO7uxNDWJ99 4nVqcjHLMeouZzfe/zCQjN9J5hRDZHFlcFORxl+hmPccSFjG9xJToulX1Arf3H0hnLHT KkHA== X-Gm-Message-State: APjAAAXhXFlcIscZ34DwjtRn/uPSySVkMpIDy2e3QaZ5EvYUL0v4m7Zh Nnmlu2DIpxILST44lFQW6kZR+A== X-Received: by 2002:a37:6e85:: with SMTP id j127mr4993065qkc.392.1571776472427; Tue, 22 Oct 2019 13:34: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 r126sm8895038qke.98.2019.10.22.13.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Oct 2019 13:34: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, qperret@google.com Cc: linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, javi.merino@kernel.org, daniel.lezcano@linaro.org Subject: [Patch v4 3/6] sched/fair: Enable CFS periodic tick to update thermal pressure Date: Tue, 22 Oct 2019 16:34:22 -0400 Message-Id: <1571776465-29763-4-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1571776465-29763-1-git-send-email-thara.gopinath@linaro.org> References: <1571776465-29763-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 682a754..4f9c2cb 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 @@ -7574,6 +7575,8 @@ static void update_blocked_averages(int cpu) done = false; update_blocked_load_status(rq, !done); + + trigger_thermal_pressure_average(rq); rq_unlock_irqrestore(rq, &rf); } @@ -9933,6 +9936,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)); + + trigger_thermal_pressure_average(rq); } /*