From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbcBZJPB (ORCPT ); Fri, 26 Feb 2016 04:15:01 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:52400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbcBZJO5 (ORCPT ); Fri, 26 Feb 2016 04:14:57 -0500 Date: Fri, 26 Feb 2016 10:14:46 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Steve Muckle , Ingo Molnar , Linux Kernel Mailing List , "linux-pm@vger.kernel.org" , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Juri Lelli , Patrick Bellasi , Michael Turquette Subject: Re: [RFCv7 PATCH 01/10] sched: Compute cpu capacity available at current frequency Message-ID: <20160226091446.GW6356@twins.programming.kicks-ass.net> References: <1456190570-4475-1-git-send-email-smuckle@linaro.org> <20160223091916.GF6356@twins.programming.kicks-ass.net> <1913831.CWh4G0m0Lj@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1913831.CWh4G0m0Lj@vostro.rjw.lan> 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 Fri, Feb 26, 2016 at 02:37:19AM +0100, Rafael J. Wysocki wrote: > That's all correct, but my question should rather be: is arch the right > granularity? > > In theory, there may be ARM64-based platforms using ACPI and behaving > like x86 in that respect in the future. Ah, so I started these hooks way before the cpufreq/cpuidle etc. integration push. Maybe we should look at something like that, but performance is really critical, you most definitely do not want 3 indirections just because abstract framework crap, that's measurable overhead on these callsites. Hence the current inline with constant value or single function call. And if archs would want a selector, I would recommend boot time call instruction rewrites a-la alternatives/paravirt.