From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbbIPRG3 (ORCPT ); Wed, 16 Sep 2015 13:06:29 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36783 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbbIPRG1 (ORCPT ); Wed, 16 Sep 2015 13:06:27 -0400 From: bsegall@google.com To: Yuyang Du Cc: Morten Rasmussen , Peter Zijlstra , Dietmar Eggemann , Vincent Guittot , Steve Muckle , "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 References: <55EED99E.2040100@arm.com> <20150909201519.GB21833@intel.com> <20150910100727.GU3644@twins.programming.kicks-ass.net> <20150911002825.GA3014@intel.com> <20150911103059.GH27098@e105550-lin.cambridge.arm.com> <20150914125648.GJ27098@e105550-lin.cambridge.arm.com> <20150914225642.GB11102@intel.com> <20150915183950.GA28071@intel.com> Date: Wed, 16 Sep 2015 10:06:24 -0700 In-Reply-To: <20150915183950.GA28071@intel.com> (Yuyang Du's message of "Wed, 16 Sep 2015 02:39:50 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yuyang Du writes: > On Tue, Sep 15, 2015 at 10:11:41AM -0700, bsegall@google.com wrote: >> > >> > I guess you are saying we are conflating NICE_0 with NICE_0_LOAD. But to me, >> > they are just integer metrics, needing a resolution respectively. That is it. >> >> Yes this would change nothing at the moment post-expansion, that's not >> the point. SLR being 10 bits and the nice-0 being 1024 are completely >> and utterly unrelated and the headers should not pretend they need to be >> the same value, > > I never said they are related, why should they be related. And they need or > need not to be the same value, fine. > > However, the SLR has to be a value. It is because it mighe be 10 or 20 (LOAD), > therefore I make SCHED_RESOLUTION_SHIFT 10 (kind of a denominator). Not the > other way around. > > We can define SCHED_RESOLUTION_SHIFT 1, and then define SLR = x * SCHED_RESOLUTION_SHIFT > with x being a random number, if you must. That's sorta the point - you could do this and it would be just as (non-)sensical. > >> any more than there should be a #define that is shared >> with every other use of 1024 in the kernel. > > The point really is, metrics (if not many ) need resolution, not just NICE_0_LOAD does. > You can choose to either hardcode a number, like SCHED_CAPACITY_SHIFT now, > or you can use SCHED_RESOLUTION_SHIFT, which is even as simple as a sign to say what > the defined is (the scaled one with a better resolution vs. the original one). > I guess this is to say we now have a (no-big-deal) resolution system. Yes they were chosen for similar reasons, but they are not conceptually related, and you couldn't decide to just bump up all the resolutions by changing SCHED_RESOLUTION_SHIFT, so doing this would just be misleading.