From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752316AbbCZRux (ORCPT ); Thu, 26 Mar 2015 13:50:53 -0400 Received: from foss.arm.com ([217.140.101.70]:54295 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807AbbCZRuw (ORCPT ); Thu, 26 Mar 2015 13:50:52 -0400 Date: Thu, 26 Mar 2015 17:51:26 +0000 From: Morten Rasmussen To: Peter Zijlstra Cc: Vincent Guittot , Ingo Molnar , linux-kernel , Preeti U Murthy , Kamalesh Babulal , Rik van Riel , Mike Galbraith , "nicolas.pitre@linaro.org" , Dietmar Eggemann , Linaro Kernel Mailman List , Paul Turner , Ben Segall Subject: Re: [PATCH v10 04/11] sched: Make sched entity usage tracking scale-invariant Message-ID: <20150326175126.GN18994@e105550-lin.cambridge.arm.com> References: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> <1425052454-25797-5-git-send-email-vincent.guittot@linaro.org> <20150323131905.GF23123@twins.programming.kicks-ass.net> <20150325173309.GS21418@twins.programming.kicks-ass.net> <20150326173845.GM18994@e105550-lin.cambridge.arm.com> <20150326174700.GE21418@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150326174700.GE21418@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2015 at 05:47:00PM +0000, Peter Zijlstra wrote: > On Thu, Mar 26, 2015 at 05:38:45PM +0000, Morten Rasmussen wrote: > > Another potential solution is to stay with weak functions but move the > > multiplication and shift into the arch_scale_*() functions by passing > > the value we want to scale into the arch_scale_*() function. That way we > > can completely avoid multiplication and shift in the default case (no > > arch_scale*() implementations, which is better than what we have today. > > > > The only downside is that for frequency invariance we need three > > arch_scale_freq_capacity() calls instead of two. > > That would still result in unconditional function calls, which on some > archs are _more_ expensive than 64bit mults. Right. Then it can only be preprocessor magic I think.