From patchwork Mon Dec 4 10:23:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 10089939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA61560329 for ; Mon, 4 Dec 2017 10:25:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3F9C28BEC for ; Mon, 4 Dec 2017 10:25:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C841D28C05; Mon, 4 Dec 2017 10:25:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 612FD28BEC for ; Mon, 4 Dec 2017 10:25:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753929AbdLDKZz (ORCPT ); Mon, 4 Dec 2017 05:25:55 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:40509 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753667AbdLDKY2 (ORCPT ); Mon, 4 Dec 2017 05:24:28 -0500 Received: by mail-wm0-f66.google.com with SMTP id f206so7046107wmf.5 for ; Mon, 04 Dec 2017 02:24:28 -0800 (PST) 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=OpMmTNGDvXNwFAi0/4Gz4YTMkJOw7JNssamTuu++29w=; b=meiw0NgsI8UIFUaIMclT8UlsbRmf2GPYQA29RhrG3EUa0ALyPvIHEhwyYPt9HE4HIg ZZD2s2OtRIg911VBVRcqUDM6p0FrzWLAyBc29JQD0XZrz9UCxwfLJnwhg22gKqgcn+Zb vhUmrvI2YoItb1K1+Z0SY0Kb2bQ3vbGGKMqboE1HoR/6lD8llNyepcRCQTWNbVK82yKu XgqlQ5/VEdO6kPmyXAM7XwOPT2zKbCeVW4Q5njzK0ai/ed9FVgfTMwtowe8WP6Gl78M7 rLj1yh6vWSAGptA8Dac97mvLbmf1MGNnulZUKRhZM5f7E/Jj5swmKwToUvJWUNuuMwoa J38Q== X-Gm-Message-State: AKGB3mJfctb+jsbH6LsCZEYvmSF58HQiN8lZMK389xpXYSiC4DYVmvYX +YOL/mAYeLvlFbK6E4VKpjNmXw== X-Google-Smtp-Source: AGs4zMbJUPjUicw3jPsiw/P+nget3HPgaZ32k+5UlrEsr+pDkfuIZgO7+kUuE2Jy5wivHSou3i5s2Q== X-Received: by 10.28.110.24 with SMTP id j24mr6341723wmc.100.1512383066797; Mon, 04 Dec 2017 02:24:26 -0800 (PST) Received: from localhost.localdomain.com ([151.68.92.1]) by smtp.gmail.com with ESMTPSA id y2sm13542473wra.18.2017.12.04.02.24.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2017 02:24:26 -0800 (PST) From: Juri Lelli To: peterz@infradead.org, mingo@redhat.com, rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, tglx@linutronix.de, vincent.guittot@linaro.org, rostedt@goodmis.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, tkjos@android.com, joelaf@google.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, patrick.bellasi@arm.com, alessio.balsini@arm.com, juri.lelli@redhat.com, Juri Lelli , Ingo Molnar Subject: [RFC PATCH v2 6/8] sched/sched.h: remove sd arch_scale_freq_capacity parameter Date: Mon, 4 Dec 2017 11:23:23 +0100 Message-Id: <20171204102325.5110-7-juri.lelli@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171204102325.5110-1-juri.lelli@redhat.com> References: <20171204102325.5110-1-juri.lelli@redhat.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Juri Lelli sd parameter is never used in arch_scale_freq_capacity (and it's hard to see where information coming from scheduling domains might help doing frequency invariance scaling). Remove it; also in anticipation of moving arch_scale_freq_capacity outside CONFIG_SMP. Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Ingo Molnar --- include/linux/arch_topology.h | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/sched.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h index 304511267c82..2b709416de05 100644 --- a/include/linux/arch_topology.h +++ b/include/linux/arch_topology.h @@ -27,7 +27,7 @@ void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity); DECLARE_PER_CPU(unsigned long, freq_scale); static inline -unsigned long topology_get_freq_scale(struct sched_domain *sd, int cpu) +unsigned long topology_get_freq_scale(int cpu) { return per_cpu(freq_scale, cpu); } diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4037e19bbca2..535d9409f4af 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3122,7 +3122,7 @@ accumulate_sum(u64 delta, int cpu, struct sched_avg *sa, u32 contrib = (u32)delta; /* p == 0 -> delta < 1024 */ u64 periods; - scale_freq = arch_scale_freq_capacity(NULL, cpu); + scale_freq = arch_scale_freq_capacity(cpu); scale_cpu = arch_scale_cpu_capacity(NULL, cpu); delta += sa->period_contrib; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 280b421a82e8..b64207d54a55 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1712,7 +1712,7 @@ extern void sched_avg_update(struct rq *rq); #ifndef arch_scale_freq_capacity static __always_inline -unsigned long arch_scale_freq_capacity(struct sched_domain *sd, int cpu) +unsigned long arch_scale_freq_capacity(int cpu) { return SCHED_CAPACITY_SCALE; } @@ -1731,7 +1731,7 @@ unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta) { - rq->rt_avg += rt_delta * arch_scale_freq_capacity(NULL, cpu_of(rq)); + rq->rt_avg += rt_delta * arch_scale_freq_capacity(cpu_of(rq)); sched_avg_update(rq); } #else