Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbbK3LN1 (ORCPT ); Mon, 30 Nov 2015 06:13:27 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:34805 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbbK3LNX (ORCPT ); Mon, 30 Nov 2015 06:13:23 -0500 MIME-Version: 1.0 In-Reply-To: <1448288921-30307-2-git-send-email-juri.lelli@arm.com> References: <1448288921-30307-1-git-send-email-juri.lelli@arm.com> <1448288921-30307-2-git-send-email-juri.lelli@arm.com> From: Vincent Guittot Date: Mon, 30 Nov 2015 12:13:02 +0100 Message-ID: Subject: Re: [RFC PATCH 1/8] ARM: initialize cpu_scale to its default To: Juri Lelli Cc: linux-kernel , "linux-pm@vger.kernel.org" , LAK , "devicetree@vger.kernel.org" , Peter Zijlstra , Rob Herring , Mark Rutland , Russell King - ARM Linux , Sudeep Holla , Lorenzo Pieralisi , Catalin Marinas , Will Deacon , Morten Rasmussen , Dietmar Eggemann Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1598 Lines: 44 On 23 November 2015 at 15:28, Juri Lelli wrote: > Instead of looping through all cpus calling set_capacity_scale, we can > initialise cpu_scale per-cpu variables to SCHED_CAPACITY_SCALE with their > definition. > > Cc: Russell King > Signed-off-by: Juri Lelli > --- > arch/arm/kernel/topology.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c > index 08b7847..ec279d1 100644 > --- a/arch/arm/kernel/topology.c > +++ b/arch/arm/kernel/topology.c > @@ -40,7 +40,7 @@ > * to run the rebalance_domains for all idle cores and the cpu_capacity can be > * updated during this sequence. > */ > -static DEFINE_PER_CPU(unsigned long, cpu_scale); > +static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; > > unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) > { > @@ -306,8 +306,6 @@ void __init init_cpu_topology(void) > cpu_topo->socket_id = -1; > cpumask_clear(&cpu_topo->core_sibling); > cpumask_clear(&cpu_topo->thread_sibling); > - > - set_capacity_scale(cpu, SCHED_CAPACITY_SCALE); > } > smp_wmb(); FWIW, Acked-by: Vincent Guittot > > -- > 2.2.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/