From patchwork Tue May 23 08:53:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 100358 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp217404qge; Tue, 23 May 2017 01:55:00 -0700 (PDT) X-Received: by 10.99.167.78 with SMTP id w14mr3844999pgo.228.1495529700218; Tue, 23 May 2017 01:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495529700; cv=none; d=google.com; s=arc-20160816; b=Sw3cy1mgXAyVK1wbOEqur58xnN+yGzkmSMpBczOwcy+yyDQUGGsAUSRsq9mp84ns3n P75syV+Stb/xkRtKA0n7ufxaOSrjXWeFS98I+kt744JKVA8ePsVYknKngLbSULfQLU2W ygL9PViabiwmtrG2i684ZnjH3U93SGhoYN1cjWHVLOdPGgDA/t2THOwljvMnjiCoQdGc mY9pp1i9guRmscoDlTjnq3yfCPgZApECyqBg5CQjVLbpKOZoqEPWJLLguCEj+O4OdiMD 7fVQX2sc1bze89ZSBftSDb1EoyedV8478gMfSaqgjCfuJicneTIoG77+HgtCsau3WI2M xXhA== 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=/ZdBMt7jjUlBcyc9f9COB7Ylf8ehMBDCVoHEvBE1Fwk=; b=g7CbBRkImFcLjrMYgOUp9MnBsDszKsHERt5jMU+EMNags4ji1EauGuLs9XSUUGiDnf KRW3t16O4a3xgs8vzjXNBl3qGbakfnhdz8YcBaobryPaV5i7d6yrv5ApYcvhndv+R8Dz ku09LE+M5Ash95W1LW3Bo9kCUzpLPhf3qgmtlQbfeu60A34/q4C3lTM1aZtlLnlxW56V tV0dPpCq0Xe8DweAwQGk0SunJX+tpqcnyi0OM7FRnjTBowrn4Vs9z8a5VRYDqIJTSwNS kay/jg8Fd1ONwqsj+6giEM6BJbUMlScGD6W7GxLrUKx+K/9sAjWvaEMwAecNX1qsAtDx ZAUQ== 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 7si20168741pfs.253.2017.05.23.01.54.59; Tue, 23 May 2017 01:55:00 -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 S936707AbdEWIyz (ORCPT + 25 others); Tue, 23 May 2017 04:54:55 -0400 Received: from foss.arm.com ([217.140.101.70]:48206 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967058AbdEWIyu (ORCPT ); Tue, 23 May 2017 04:54:50 -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 E5B6E1684; Tue, 23 May 2017 01:54:49 -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 252AD3F53D; Tue, 23 May 2017 01:54:46 -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: [PATCH RFC 6/8] sched/sched.h: remove sd arch_scale_freq_capacity parameter Date: Tue, 23 May 2017 09:53:49 +0100 Message-Id: <20170523085351.18586-7-juri.lelli@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170523085351.18586-1-juri.lelli@arm.com> References: <20170523085351.18586-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 219fe58e3023..b0f31064bbbd 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2812,7 +2812,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 e48cc8762e04..063fd8c47e75 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1641,7 +1641,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; } @@ -1660,7 +1660,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