From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752431AbbIGNZS (ORCPT ); Mon, 7 Sep 2015 09:25:18 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:49687 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222AbbIGNZP convert rfc822-to-8bit (ORCPT ); Mon, 7 Sep 2015 09:25:15 -0400 Subject: Re: [PATCH 2/6] sched/fair: Convert arch_scale_cpu_capacity() from weak function to #define To: Vincent Guittot References: <1439569394-11974-1-git-send-email-morten.rasmussen@arm.com> <1439569394-11974-3-git-send-email-morten.rasmussen@arm.com> <55E8A65F.2070903@arm.com> Cc: Morten Rasmussen , Peter Zijlstra , "mingo@redhat.com" , Daniel Lezcano , Yuyang Du , Michael Turquette , "rjw@rjwysocki.net" , Juri Lelli , Sai Charan Gurrappadi , "pang.xunlei@zte.com.cn" , linux-kernel From: Dietmar Eggemann Message-ID: <55ED9037.8050702@arm.com> Date: Mon, 7 Sep 2015 14:25:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: X-OriginalArrivalTime: 07 Sep 2015 13:25:12.0116 (UTC) FILETIME=[9FD91F40:01D0E970] X-MC-Unique: ejFVeTEESSqhH4fjp6cQ6w-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/15 08:26, Vincent Guittot wrote: > On 3 September 2015 at 21:58, Dietmar Eggemann wrote: [...] >>> So you change the way to declare arch_scale_cpu_capacity but i don't >>> see the update of the arm arch which declare a >>> arch_scale_cpu_capacity to reflect this change in your series. >> >> We were reluctant to do this because this functionality makes only sense >> for ARCH=arm big.Little systems w/ cortex-a{15|7} cores and only if the >> clock-frequency property is set in the dts file. > > IMO, we should maintain the compatibility of current implementation > instead of breaking the link and creating a dead code. > Your proposal below fits the requirement The only problem with this solution is that now we got a call to arch_scale_cpu_capacity() in the hotpath whereas before it is only called in update_cpu_capacity(). An implementation of scale_cpu_capacity() in arch/arm/kernel/topology.c leads to a function call in __update_load_avg. I'm in the middle of doing some performance tests on TC2 w/ and w/o the cpu invariant implementation. > >> >> Are you planning to push for a 'struct cpu_efficiency/clock-frequency >> property' solution for ARCH=arm64 as well? > > I know that there has been some discussions aorund that but i didn't > follow the thread in details > >> >> I'm asking because for ARCH=arm64 systems today (JUNO, Hi6220) we use the >> capacity value of the last entry of the capacity_state vector for the cores >> (e.g. cortex-a{57|53). > > This is a struct of the eas feature ? Not sure that we should link the > definition of the cpu capacity to an internal struct of a feature; DT > seems a better way to define it. Yeah, the cpu invariant functionality should not base on EAS. We just use the short-cut in EAS RFCv5 to get it working on ARM64. > So if you want to revisit the way, we set the capacity of CPU for arm > and/or arm64, I'm fully open to the discussion but this should happen > in another thread than this one which has for only purpose the > alignment of the arch_scale_cpu_capacity interface declaration with > arch_scale_freq_capacity one. Agreed. > > So, with the patch below that updates the arm definition of > arch_scale_cpu_capacity, you can add my Acked-by: Vincent Guittot > on this patch and the additional one > below > > Regards, > Vincent [...]