From patchwork Wed Jul 5 08:59:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 107048 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp565932obb; Wed, 5 Jul 2017 02:00:43 -0700 (PDT) X-Received: by 10.84.218.71 with SMTP id f7mr20632467plm.282.1499245243780; Wed, 05 Jul 2017 02:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499245243; cv=none; d=google.com; s=arc-20160816; b=JRLesi9WdFkMVg0poDeUXvA4eJU1TDA2YqwdBifKK8yT/IQD4krkKsbboWlX2Lc5XH jAt8f+MnvDSj1ljCAZhk685d7QsNAVH1QFBcYBNOROnxZ6qFiCr0cYOIlgkoEvKFTAPP OE96dj6uqOfBYXokcIAd3f+6jhTZfUKgbV3FUr6oB4/ciQPxqr4+/isAALPvOuAd5C3O qEEe0XF4TeK1GgfLpLMrbNtmydPaAN75+Wq7gCFET6m/3m1zxb3vKQth170oGmYqBKGq DI7CGbwHDw1kHfYHWdt76oVZ+UFxd8Q/+lD6RqVIZ0gpGmD/nY3XQiNCRI77psQq3GGQ tguA== 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:arc-authentication-results; bh=8II4iFVVEPMXw6+xStuANYLtb7rnEyhVbXFJs4A7Qfc=; b=TxRhhsLVajIEyNJD8dK44Whdxj7BxydecGBvQkEhJsW6N1cPu6jqDRBgOY35xmgxDN GDnHWO1qH/iKMnzkpdgj6BxXj5IREMnD7fTjh04H+4tDOzneYof27v9Y+PCtZKxOVeLr GN++eNDusOgPlrpgN5o3O/2rw3vBQeq3aq5TD8kt3bATg8/ZPXOYQ6cmhoSGcKzuRKDY 2O/WPri9jYdE5YyxWHF/r8rdhxoTAr5/mb4BEBY5cDBX3yrK4HjjSvhCkudqzidE0rGO STmyuk0rdAbGTWVganZOf1MYpWTJeQrFFMKOZJN3NDfGchfn9uDOZxmu9sh8XFjpafM3 YtKw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si17671927plk.487.2017.07.05.02.00.43; Wed, 05 Jul 2017 02:00:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbdGEJAh (ORCPT + 25 others); Wed, 5 Jul 2017 05:00:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53606 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752431AbdGEJAf (ORCPT ); Wed, 5 Jul 2017 05:00:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0CBF3165D; Wed, 5 Jul 2017 02:00:35 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (e106622-lin.cambridge.arm.com [10.1.211.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C36C33F581; Wed, 5 Jul 2017 02:00:31 -0700 (PDT) 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, andresoportus@google.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, patrick.bellasi@arm.com, juri.lelli@arm.com, Ingo Molnar Subject: [RFC PATCH v1 6/8] sched/sched.h: remove sd arch_scale_freq_capacity parameter Date: Wed, 5 Jul 2017 09:59:03 +0100 Message-Id: <20170705085905.6558-7-juri.lelli@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170705085905.6558-1-juri.lelli@arm.com> References: <20170705085905.6558-1-juri.lelli@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- kernel/sched/fair.c | 2 +- kernel/sched/sched.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 008c514dc241..97bd5aae285d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2875,7 +2875,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 1be5dac728a4..ec5769288927 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1673,7 +1673,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; } @@ -1692,7 +1692,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