From patchwork Tue Oct 9 16:24:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 148515 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5110158lji; Tue, 9 Oct 2018 09:25:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63i5oDUezqbcFNqB7BtwxL89D+u8aSA4HhsL3sNuUmBYcyi+2bqx8NgQq2RbgzFCKIaj0NL X-Received: by 2002:a62:c957:: with SMTP id k84-v6mr31669125pfg.205.1539102339855; Tue, 09 Oct 2018 09:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539102339; cv=none; d=google.com; s=arc-20160816; b=I6D8fNvDX3QASpvzz1Zh86eRv1AmbY/+jh4UYNENj2MyJLKgF1tw5e0/O0+U5Lw+n+ eF4RjdNLkkvFuCcjcELX/+oa3fc3YdlEavzOtHopZ52uYmxOG8m72pxu+c2Bi+hwMlFY Ks5Am0zz3pPhVGFJ3u1Uw3fYQXV6kWTVaE6MueuhNeDpF/MlO3SSulZ423PcJ7qGlQY4 jyiKLNe6PV//CztWWQAZD0cRDC3I+d8csYkjNVFjJOZi2fG8C/UfW/hdcahSNXMyv7Q6 ZVkwTANdxBNrQdYeWBGMryTGnHt+vlNnYxmI6FUChUGXlDKm1n/thmbfSdKCbubyKhPH cONg== 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=rGWgMI1+Sov2UL2W3G/z4V3AYRc3F2jCrmMhsGLsaSc=; b=ZLHDSuyQ6LYqj8+iDRiyaj8N02sKnglEcpVDv4vUoVGkL9HZvRPVZ058Do8af3Akub LrcAXvrwRGn6tIEZlVMANdLILLNZjKQIQqv05YoVCkUcjMbVFAfcAV75+UXZDr+pUDbA B0L/W6n6qnuJ3m0QvDdesEZeEiJqtm4TPkvnEKsy+9QOWMi6MCPdESzkj0u7is81m2cL 21Y+9yaSe0xv0wB0nnhGkd54jU0Hu1TAF7NOALvMyliQMpsq9M4OzFtvaqFMc/DQV5KZ RT11i6yNik+CuXRXSFeUB1m5Gadk3cXFOSznMRvN06G8DxRA5dSZPvVCmEKAMJRU4jaH iQMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFjTPb7G; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 d4-v6si11737235pgl.524.2018.10.09.09.25.39; Tue, 09 Oct 2018 09:25:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=kFjTPb7G; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1726925AbeJIXm4 (ORCPT + 10 others); Tue, 9 Oct 2018 19:42:56 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35394 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbeJIXm4 (ORCPT ); Tue, 9 Oct 2018 19:42:56 -0400 Received: by mail-qk1-f193.google.com with SMTP id v68-v6so1321627qka.2 for ; Tue, 09 Oct 2018 09:25:13 -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=rGWgMI1+Sov2UL2W3G/z4V3AYRc3F2jCrmMhsGLsaSc=; b=kFjTPb7GvlvcqqUl63mme8PN5mlZcwqjW+ATtvnaJEl0XoFJMZ8Ay1WAVuHps+VgBx svfB27nf95qf95qR0svOwo2QaQGuIHYeV61E9ryxHuKhYiNtk9JwfuH+E/lPn6jUjiY8 6ZdgxI8FTxReaKCHOyf6fDISPoGJVymJosJYo= 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=rGWgMI1+Sov2UL2W3G/z4V3AYRc3F2jCrmMhsGLsaSc=; b=LOUFsPeKk4r8DkNwuZPHg7h8wFGA/wVV9dmRf+Dx9HXs3VqQVcyGz4q+kHfTgMvK6Y 1W+BjbN41bFjht8L7+AhtwvIBvrRj9/bpCDRtapWHytlPVuMOGHFCwKPoh1kPPqp3Efs 2AY/S5dsuZiX26PRN+Ow9D0jXC3CU01NuM34rnJ7V5UVuLeS6tNUj8S9GL6qQKWz920w FlXzmU4Rl87tO3Uql03CjHpGF6EzELLLdAJJgeCWEORIrwmctZxxk54hRXkksY+K/jv9 LrBBsharWdrPjnDSFF51cJPWr8YV6/c1Gdz6e9bb4oCD9Flin3KXjAKMhef11qS3gOqr mktA== X-Gm-Message-State: ABuFfoheGEwdihF0xRf0s/8117y9s3sx04Hfv9RnVaylIhdSBD5Nwzbv PAx4NLaW3q89D3Nrf/RxXNvFzg== X-Received: by 2002:a37:10a7:: with SMTP id 39-v6mr22580045qkq.131.1539102312277; Tue, 09 Oct 2018 09:25:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 09:25:11 -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 4/7] sched: Initialize per cpu thermal pressure structure Date: Tue, 9 Oct 2018 12:24:59 -0400 Message-Id: <1539102302-9057-5-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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Initialize per cpu max_capacity_info during scheduler init. Signed-off-by: Thara Gopinath --- drivers/base/arch_topology.c | 1 + kernel/sched/core.c | 2 ++ 2 files changed, 3 insertions(+) -- 2.1.4 diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index e7cb0c6..542745f 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -126,6 +126,7 @@ void topology_normalize_cpu_scale(void) pr_debug("cpu_capacity: CPU%d cpu_capacity=%lu\n", cpu, topology_get_cpu_scale(NULL, cpu)); } + populate_max_capacity_info(); mutex_unlock(&cpu_scale_mutex); } diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 625bc98..f0eed1a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5868,6 +5868,8 @@ void __init sched_init_smp(void) init_sched_rt_class(); init_sched_dl_class(); + populate_max_capacity_info(); + sched_smp_initialized = true; }