From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754042AbbIJKHm (ORCPT ); Thu, 10 Sep 2015 06:07:42 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:44002 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753937AbbIJKHl (ORCPT ); Thu, 10 Sep 2015 06:07:41 -0400 Date: Thu, 10 Sep 2015 12:07:27 +0200 From: Peter Zijlstra To: Yuyang Du Cc: Dietmar Eggemann , Vincent Guittot , Steve Muckle , Morten Rasmussen , "mingo@redhat.com" , "daniel.lezcano@linaro.org" , "mturquette@baylibre.com" , "rjw@rjwysocki.net" , Juri Lelli , "sgurrappadi@nvidia.com" , "pang.xunlei@zte.com.cn" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Message-ID: <20150910100727.GU3644@twins.programming.kicks-ass.net> References: <1439569394-11974-1-git-send-email-morten.rasmussen@arm.com> <1439569394-11974-6-git-send-email-morten.rasmussen@arm.com> <55E8DD00.2030706@linaro.org> <55EDAF43.30500@arm.com> <55EDDD5A.70904@arm.com> <55EED99E.2040100@arm.com> <20150909201519.GB21833@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150909201519.GB21833@intel.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, Sep 10, 2015 at 04:15:20AM +0800, Yuyang Du wrote: > On Tue, Sep 08, 2015 at 01:50:38PM +0100, Dietmar Eggemann wrote: > > > It's both a unit and a SCALE/SHIFT problem, SCHED_LOAD_SHIFT and > > > SCHED_CAPACITY_SHIFT are defined separately so we must be sure to > > > scale the value in the right range. In the case of cpu_usage which > > > returns sa->util_avg , it's the capacity range not the load range. > > > > Still don't understand why it's a unit problem. IMHO LOAD/UTIL and > > CAPACITY have no unit. > > To be more accurate, probably, LOAD can be thought of as having unit, > but UTIL has no unit. But I'm thinking that is wrong; it should have one, esp. if we go scale the thing. Giving it the same fixed point unit as load simplifies the code.