Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3936216ybp; Sun, 13 Oct 2019 17:59:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaf7oTJXoVArg8uKhuGbqQKNQQOOoPclh9f2cjSjiX8L9vxr8F0XepxFTOk+lSpXxCMScm X-Received: by 2002:a17:907:4182:: with SMTP id mz2mr26003921ejb.326.1571014750289; Sun, 13 Oct 2019 17:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571014750; cv=none; d=google.com; s=arc-20160816; b=bqQ5Kub8pGxfYsN8esf9I9VX3kfiGxNsJ7C2Vt6XeXMBCEHQ3skGOKi2cR+VKoH2o1 6B+r2l5W+D/ZxZtQvt3tskFIkiIF4xgy+N9rZjpkEuPuPqWO1CDJ59HCQJ3SbKl6bz8p kM+Gzv6AIJbslJ4v4TXzacwdKgQFMTkUlnRVPFoNd2SOSneEEAnGEcOWF4UzqFOVsTid uokrEfN0OG4whqxNneXRoqehRS1NVfweaFDu+uzL1xG1ANJmyAiI0qd3HmoDbJSlc7WU 2/o/nie7oR0iHzWDxL0WuiNQ+NqmtcSAVEBXbG07kWa3CJUYKPzSEtki3JWQ6kNFrRKJ fB/g== 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=O3q+7yGZl2chLLPUpezQ1APj0BawGHMOVtLNFWKxjdQ=; b=MbNKOsx7niBpoHNjJUTZcKSbHczZBkhB+bQOfdAoLOYMnsYZHvO2Es2F3uK4nZ0oCY RBl8u+xlEwraNEwPs+c+QVyDH/50X9Sa544JtETlFN/9JppkYRzpr0HjJLw5KNfrCx/y rWR6jn0W9bsByWZnM7tRLcylgw3D/MW9ODJg2hq83eyVT9nlkgiYQUyvgpDYwVf4DcIs Qfw9V6GzyTJnlifTTJrl2Tws3NRTXfAk7KVD8sMz2s0gGZkQbdXKWIqNE0QWRaXySRQ9 3dU/Lyj7fLJpa71EbMMp+lgsMYYkCRTfpBH/kD3nvRGO1yK7V32ercCx16Y/UkHGw2CO VjIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sGu/fE49"; 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 j5si10144841ejb.212.2019.10.13.17.58.46; Sun, 13 Oct 2019 17:59:10 -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="sGu/fE49"; 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 S1729771AbfJNA6f (ORCPT + 99 others); Sun, 13 Oct 2019 20:58:35 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41868 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729755AbfJNA6e (ORCPT ); Sun, 13 Oct 2019 20:58:34 -0400 Received: by mail-qt1-f194.google.com with SMTP id v52so23099416qtb.8 for ; Sun, 13 Oct 2019 17:58:34 -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=O3q+7yGZl2chLLPUpezQ1APj0BawGHMOVtLNFWKxjdQ=; b=sGu/fE49gKyoicIdmc+SvTZvUPm5tvfqbr3kTEypxNdupK5o9nrTkoCNKbZyyfDYKD 7zCSi1Wncjkk90GTtZRvVJWyV2+hHS/r5WCpRoJNKoZhvrBDQlJ392xhw6+Tt4ihP/t+ i4lILG6nsR9FUK1Pa9QN08bT5xX0ZQJPdWv8MEgNFHqu3W/f4Sky0M6hHjPgtCFqVfOt GjtK1h3myOd09NZJGMABRoqhG+0xs0EbeuEUrbpsQ1HwdoZK5ngky8FPVzu/9smWxKPo vzghjqJW0GQtgr3InovmLxEzj/PKZrRkra84LnlHq5QIT6xtciefugtgcoO373q0QFKh 0k/g== 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=O3q+7yGZl2chLLPUpezQ1APj0BawGHMOVtLNFWKxjdQ=; b=n+xtsdJoAnw39OYiKZE59/wGJmHoxtH9KXdYAwG8b1Iea71dkravcaGfuhH19AIMyJ GlnXw9t0zVJvV7dBjUXfQ+nD0r7sXdf9Lg5D5T37CHPv9qOwMnCj2WVNCaQmxbyv6d2E DpZ1+CMOhFNhyoPgLSgf7eJiKTuUwtxHJ9NT7xXtvsw7+NqgeOFukuXciHFScrK5a+6J ftxVfoFqCy7/4E6g3SSDMLHrTFDZ2sYG3wyfhSsW3sst+UPHLv3prIV4QqasogFpHc1v XxghnBMRdOy/3tBPpnwupRs9EDVYO78qt68oK6mznm9bdIfn/n5AGuT1K5ilvss8RgHH qwqA== X-Gm-Message-State: APjAAAVC/OrDUl4+cqbY7hH8ui+W31ydKKPE4RflCaGVQikqF0IXyyax 4sLiY8+SCjow2BE3NIXx5ireFw== X-Received: by 2002:ac8:740b:: with SMTP id p11mr29727737qtq.71.1571014713876; Sun, 13 Oct 2019 17:58:33 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Oct 2019 17:58:33 -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 5/7] sched/fair: update cpu_capcity to reflect thermal pressure Date: Sun, 13 Oct 2019 20:58:23 -0400 Message-Id: <1571014705-19646-6-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 cpu_capacity relflects the maximum available capacity of a cpu. Thermal pressure on a cpu means this maximum available capacity is reduced. This patch reduces the average thermal pressure for a cpu from its maximum available capacity so that cpu_capacity reflects the actual available capacity. Signed-off-by: Thara Gopinath --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fe7c165..cbc2208 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7719,6 +7719,7 @@ static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu) used = READ_ONCE(rq->avg_rt.util_avg); used += READ_ONCE(rq->avg_dl.util_avg); + used += READ_ONCE(rq->avg_thermal.load_avg); if (unlikely(used >= max)) return 1; -- 2.1.4