From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752310AbbCZRrW (ORCPT ); Thu, 26 Mar 2015 13:47:22 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:34342 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbbCZRrS (ORCPT ); Thu, 26 Mar 2015 13:47:18 -0400 Date: Thu, 26 Mar 2015 18:47:00 +0100 From: Peter Zijlstra To: Morten Rasmussen 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: <20150326174700.GE21418@twins.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150326173845.GM18994@e105550-lin.cambridge.arm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.