Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934415AbcCPMjO (ORCPT ); Wed, 16 Mar 2016 08:39:14 -0400 Received: from mail-lb0-f195.google.com ([209.85.217.195]:34026 "EHLO mail-lb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932460AbcCPMjM (ORCPT ); Wed, 16 Mar 2016 08:39:12 -0400 MIME-Version: 1.0 In-Reply-To: <20160316085339.GU6344@twins.programming.kicks-ass.net> References: <1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com> <1457932932-28444-6-git-send-email-mturquette+renesas@baylibre.com> <20160315212520.GF6344@twins.programming.kicks-ass.net> <20160315220609.30639.67271@quark.deferred.io> <20160316074123.GP6344@twins.programming.kicks-ass.net> <20160316085339.GU6344@twins.programming.kicks-ass.net> Date: Wed, 16 Mar 2016 13:39:10 +0100 X-Google-Sender-Auth: 6YnFSVymqapC3Pum0q9ZlPw2cFc Message-ID: Subject: Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: Vincent Guittot , Michael Turquette , "rjw@rjwysocki.net" , linux-kernel , "linux-pm@vger.kernel.org" , Juri Lelli , Steve Muckle , Morten Rasmussen , Dietmar Eggemann , Michael Turquette Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 19 On Wed, Mar 16, 2016 at 9:53 AM, Peter Zijlstra wrote: > On Wed, Mar 16, 2016 at 09:29:59AM +0100, Vincent Guittot wrote: >> I wonder if it's really worth passing per sched_class request to >> sched_util ? sched_util is about selecting a frequency based on the >> utilization of the CPU, it only needs a value that reflect the whole >> utilization. Can't we sum (or whatever the formula we want to apply) >> utilizations before calling cpufreq_update_util > > So I've thought the same; but I'm conflicted, its a shame to compute > anything if the call then doesn't do anything with it. > > And keeping a structure of all the various numbers to pass in also has > cost of yet another cacheline to touch. In principle we can use high-order bits of util and max to encode the information on where they come from. Of course, that translates to additional ifs in the governor, but I guess they are unavoidable anyway.