From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbbHCJXO (ORCPT ); Mon, 3 Aug 2015 05:23:14 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:33931 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbbHCJXM (ORCPT ); Mon, 3 Aug 2015 05:23:12 -0400 MIME-Version: 1.0 In-Reply-To: <1436293469-25707-2-git-send-email-morten.rasmussen@arm.com> References: <1436293469-25707-1-git-send-email-morten.rasmussen@arm.com> <1436293469-25707-2-git-send-email-morten.rasmussen@arm.com> From: Vincent Guittot Date: Mon, 3 Aug 2015 11:22:50 +0200 Message-ID: Subject: Re: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler load-tracking support To: Morten Rasmussen Cc: Peter Zijlstra , "mingo@redhat.com" , Daniel Lezcano , Dietmar Eggemann , Yuyang Du , Michael Turquette , "rjw@rjwysocki.net" , Juri Lelli , sgurrappadi@nvidia.com, pang.xunlei@zte.com.cn, linux-kernel , "linux-pm@vger.kernel.org" , Russell King Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Morten, On 7 July 2015 at 20:23, Morten Rasmussen wrote: > From: Morten Rasmussen > [snip] > - > #endif > diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c > index 08b7847..9c09e6e 100644 > --- a/arch/arm/kernel/topology.c > +++ b/arch/arm/kernel/topology.c > @@ -169,6 +169,23 @@ static void update_cpu_capacity(unsigned int cpu) > cpu, arch_scale_cpu_capacity(NULL, cpu)); > } > > +/* > + * Scheduler load-tracking scale-invariance > + * > + * Provides the scheduler with a scale-invariance correction factor that > + * compensates for frequency scaling (arch_scale_freq_capacity()). The scaling > + * factor is updated in smp.c > + */ > +unsigned long arm_arch_scale_freq_capacity(struct sched_domain *sd, int cpu) > +{ > + unsigned long curr = atomic_long_read(&per_cpu(cpu_freq_capacity, cpu)); access to cpu_freq_capacity to should be put under #ifdef CONFIG_CPU_FREQ. Why haven't you moved arm_arch_scale_freq_capacity in smp.c as everything else for frequency in-variance is already in this file ? This should also enable you to remove DECLARE_PER_CPU(atomic_long_t, cpu_freq_capacity); from topology.h Vincent > + > + if (!curr) > + return SCHED_CAPACITY_SCALE; > + > + return curr; > +} > + > #else > static inline void parse_dt_topology(void) {} > static inline void update_cpu_capacity(unsigned int cpuid) {} > -- > 1.9.1 >